mirror of
https://github.com/flynx/git-utils.git
synced 2025-10-29 11:10:09 +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
|
#!/bin/bash
|
||||||
|
|
||||||
|
# config...
|
||||||
|
#
|
||||||
|
#FALLBACK_TO_PULL=yes
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
while true ; do
|
while true ; do
|
||||||
case $1 in
|
case $1 in
|
||||||
-h|--help)
|
-h|--help)
|
||||||
@ -38,6 +44,8 @@ while true ; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
FALLBACK_TO_PULL=${FALLBACK_TO_PULL:=yes}
|
||||||
|
|
||||||
TARGET_PATH=${TARGET_PATH:=.}
|
TARGET_PATH=${TARGET_PATH:=.}
|
||||||
cd "$TARGET_PATH"
|
cd "$TARGET_PATH"
|
||||||
|
|
||||||
@ -49,7 +57,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
# inside a repo...
|
# 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..."
|
echo "running inside a repository, falling back to vanilla pull..."
|
||||||
git pull
|
git pull
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user