mirror of
https://github.com/flynx/git-utils.git
synced 2025-10-28 10:40:08 +00:00
made pull fallback optional...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
fad6705320
commit
cf6b94b6bf
10
git-pullall
10
git-pullall
@ -1,5 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# config...
|
||||
#
|
||||
#FALLBACK_TO_PULL=yes
|
||||
#
|
||||
|
||||
|
||||
while true ; do
|
||||
case $1 in
|
||||
-h|--help)
|
||||
@ -38,6 +44,8 @@ while true ; do
|
||||
done
|
||||
|
||||
|
||||
FALLBACK_TO_PULL=${FALLBACK_TO_PULL:=yes}
|
||||
|
||||
TARGET_PATH=${TARGET_PATH:=.}
|
||||
cd "$TARGET_PATH"
|
||||
|
||||
@ -49,7 +57,7 @@ fi
|
||||
|
||||
|
||||
# inside a repo...
|
||||
if [ -d ./.git ] ; then
|
||||
if [ $FALLBACK_TO_PULL = "yes" ] && [ -d ./.git ] ; then
|
||||
echo "running inside a repository, falling back to vanilla pull..."
|
||||
git pull
|
||||
exit 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user