standardize: read user input with [key] instead of <key>, [long input] instead of <INPUT>; echo path with [[path]]

This commit is contained in:
Luk Lu
2023-10-10 10:23:51 +08:00
parent c56fb5202f
commit 5253cac12b
26 changed files with 153 additions and 153 deletions

View File

@@ -5,25 +5,25 @@ then
FONPATH=$1
else
echo ""
echo "=== Enter <fonpath> or leave <blank> for default to '.'"
echo "=== Enter [start path] or [leave blank] for default to [[`pwd`]]"
read -p ">>> " FONPATH
echo ""
if [ ! "$FONPATH" ]
then
FONPATH=.
FONPATH=`pwd`
fi
fi
if [ ! -d "$FONPATH" ]
then
echo "××× <$FONPATH> not exist! Exit now. ***"
echo "××× [[$FONPATH]] not exist! Exit now. ***"
exit
else
echo "√√√ FONPATH = $FONPATH"
echo "√√√ FONPATH = [[$FONPATH]]"
fi
cd $FONPATH
echo "*** Starting from [`pwd`] ***"
echo "*** Starting from [[`pwd`]] ***"
echo ""
echo "=== Enter [path-to-seafile-ignore.txt]"
@@ -31,7 +31,7 @@ read -p ">>> " SFIGNOREPATH
echo ""
if [ ! -f "$SFIGNOREPATH/seafile-ignore.txt" ]
then
echo "××× Not existed [$SFIGNOREPATH/seafile-ignore.txt]. Exit now..."
echo "××× Not found [[$SFIGNOREPATH/seafile-ignore.txt]]. Exit now..."
exit
fi
@@ -39,7 +39,7 @@ find . -mindepth 1 -maxdepth 3 -type d -name '[^.]*' | grep -E -v 'node_modules
do
if [ -d "$repo/.git" ]
then
echo "---- updating seafile-ignore.txt in [$repo] ----"
echo "---- updating seafile-ignore.txt in [[$repo]] ----"
cp $SFIGNOREPATH/seafile-ignore.txt $repo/
echo ""
fi