From 7760daf87c285a704829b7542e0c7bdc6a6ae990 Mon Sep 17 00:00:00 2001 From: mollusk Date: Thu, 27 Jul 2017 10:50:18 -0700 Subject: [PATCH] wire-build.sh: added function for git pull --- wire-build.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/wire-build.sh b/wire-build.sh index 8a7d588..6359248 100755 --- a/wire-build.sh +++ b/wire-build.sh @@ -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" ;;