starlord 41d37f9648 re-organize project
Former-commit-id: 898c2c8b0b2cfdc1b8664062aa0ea910a93566dd
2019-10-14 09:51:48 +08:00

43 lines
692 B
Bash
Executable File

#!/bin/bash
BUILD_TYPE="Release"
while getopts "p:t:d:h" arg
do
case $arg in
t)
BUILD_TYPE=$OPTARG # BUILD_TYPE
;;
h) # help
echo "
parameter:
-p: postgresql install path.
-t: build type
usage:
./build.sh -t \${BUILD_TYPE}
"
exit 0
;;
?)
echo "unknown argument"
exit 1
;;
esac
done
if [[ -d build ]]; then
rm ./build -r
fi
while IFS='' read -r line || [[ -n "$line" ]]; do
cd $line
./build.sh -t ${BUILD_TYPE}
if [ $? -ne 0 ];then
exit 1
fi
cd ../
done < project.conf