wire-build.sh: added function for git pull

This commit is contained in:
mollusk 2017-07-27 10:50:18 -07:00
parent adae88663e
commit 7760daf87c

View File

@ -28,6 +28,12 @@ build_rpm(){
mv -v ${PACKAGE_DEFAULT_DIR}/*.rpm ${BIN_DIR}
}
git_pull(){
if [ -d .git ];then
git stash
git pull origin master
fi
}
main(){
if [ ! -d ${BIN_DIR} ];then
@ -37,13 +43,13 @@ main(){
case $1 in
all | -a) build_rpm && build_deb
all | -a) git_pull && build_rpm && build_deb
;;
deb | -d) build_deb
deb | -d) git_pull && build_deb
;;
rpm | -r) build_rpm
rpm | -r) git_pull && build_rpm
;;
*)
@ -51,7 +57,7 @@ main(){
printf "Usage: $0 [-a/all | -d/deb | -r/rpm ]\n\n"
printf " -a | all build all package formats\n"
printf " -d | deb build only DEB package format\m"
printf " -d | deb build only DEB package format\n"
printf " -r | rpm build only RPM package format\n\n"
;;