rename bittic.org to TIC.CC, bittic.cn to tic.cc
This commit is contained in:
parent
20bafeaac5
commit
b64ce363bf
@ -54,11 +54,11 @@ do
|
||||
do
|
||||
if [ -d "$repo/.git" ]
|
||||
then
|
||||
echo "---- git add-commit-push [`pwd`/$repo] ----"
|
||||
cd "$repo"
|
||||
echo "---- git commit & push [`pwd`/$repo] ----"
|
||||
pushd "$repo"
|
||||
git add . && git commit -m "$COMMIT_MESSAGE" && git push
|
||||
echo ""
|
||||
cd ..
|
||||
popd
|
||||
fi
|
||||
done
|
||||
cd ..
|
||||
|
58
git-push-recursive.sh
Normal file
58
git-push-recursive.sh
Normal file
@ -0,0 +1,58 @@
|
||||
#!/bin/bash
|
||||
|
||||
testpath1=/faronear
|
||||
testpath2=~/faronear
|
||||
testpath3=/mnt/d/faronear
|
||||
|
||||
if [ "$1" ]
|
||||
then
|
||||
FONPATH=$1
|
||||
elif [ -d $testpath1 ]
|
||||
then
|
||||
FONPATH=$testpath1
|
||||
elif [ -d $testpath2 ]
|
||||
then
|
||||
FONPATH=$testpath2
|
||||
elif [ -d $testpath3 ]
|
||||
then
|
||||
FONPATH=$testpath3
|
||||
else
|
||||
echo "=== Enter [target path] or leave [blank] for default to `.`"
|
||||
read -p ">>> " FONPATH
|
||||
echo ""
|
||||
if [ ! "$FONPATH" ]
|
||||
then
|
||||
FONPATH=.
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -d "$FONPATH" ]
|
||||
then
|
||||
echo "*** [$FONPATH] not exist! Exit now. ***"
|
||||
exit
|
||||
fi
|
||||
|
||||
pushd $FONPATH
|
||||
echo "*** Starting from [`pwd`] ***"
|
||||
echo ""
|
||||
|
||||
echo "=== Enter [commit message] or leave [blank] for default to 'updated'"
|
||||
read -p ">>> " COMMIT_MESSAGE
|
||||
if [ ! $COMMIT_MESSAGE ]
|
||||
then
|
||||
COMMIT_MESSAGE="updated"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
find . -mindepth 1 -maxdepth 3 -type d -name '?*' | grep -v 'node_modules' | while read repo
|
||||
do
|
||||
if [ -d "$repo/.git" ]
|
||||
then
|
||||
echo "---- git commit & push [`pwd`/$repo] ----"
|
||||
pushd "$repo"
|
||||
git add . && git commit -m "$COMMIT_MESSAGE" && git push
|
||||
echo ""
|
||||
popd
|
||||
fi
|
||||
done
|
||||
popd
|
Loading…
Reference in New Issue
Block a user