diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-06-28 07:34:24 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-06-28 07:34:24 +0200 |
commit | f09d8507ecc598fad002dc75fa3f9c673b1d85d9 (patch) | |
tree | 8a9cecebb07ee9d795a3bb3118f74b8a2e6f64c7 /easy_e17.sh | |
parent | 86c76cf3c0c7da3999ff6ee2685e2d1e0cf3e960 (diff) | |
parent | 40f3682ca7cac9ab2ad2be321d0b5c06c1ff92ff (diff) | |
download | bin-f09d8507ecc598fad002dc75fa3f9c673b1d85d9.zip bin-f09d8507ecc598fad002dc75fa3f9c673b1d85d9.tar.gz |
Merge branch 'master' of asynk.ch:bin
Diffstat (limited to 'easy_e17.sh')
-rwxr-xr-x | easy_e17.sh | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/easy_e17.sh b/easy_e17.sh index 344b55a..c85d106 100755 --- a/easy_e17.sh +++ b/easy_e17.sh @@ -458,7 +458,6 @@ function parse_args () done } - function build_package_list () { effective_packages="" @@ -784,19 +783,22 @@ function parse_svn_updates () done } + +# GIT ############################################################################# + function git_fetch () { if [ -d $src_path/.git ]; then set_title "Updating sources in '$src_path' ..." echo "- updating sources in '$src_path' ..." cd $src_path - SHA_PREV=$(git log --pretty="format:%H" HEAD~1..) - # checkout modified files !!! echo "- checkout modified files" - git status -s | grep -e '^ M' | cut -d " " -f 3 | xargs git checkout + git status -s | grep -e '^ M' | cut -d " " -f 3 | xargs git checkout 2>/dev/null echo "- remove untracked files" - git status -s | grep -e '^??' | cut -d " " -f 2 | xargs rm - git pull + git status -s | grep -e '^??' | cut -d " " -f 2 | xargs rm 2>/dev/null + SHA_PREV=$(git log --pretty="format:%H" HEAD~1..) + echo "- pull from `git remote -v | grep origin | grep fetch | cut -f 2 |cut -d " " -f 1`" + git pull --no-stat SHA_HEAD=$(git log --pretty="format:%H" HEAD~1..) git show ${SHA_PREV}..${SHA_HEAD} --name-only --pretty="format:" | sort | uniq | grep -v -e '^$' | cut -d " " -f 1 > "$tmp_path/source_update.log" else @@ -1192,7 +1194,7 @@ if [ "$action" == "update" ] && [ -e "$tmp_path/source_update.log" ]; then parse_git_updates fi if [ -z "$updated_packages" ]; then - echo -e "\n - - - NO UPDATES AVAILABLE - - -\n" + echo "- nothing to do" fi fi pkg_total=`echo "$updated_packages" | wc -w` |