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

@@ -3,14 +3,14 @@
echo "in [REPOROOT]/*/*/hooks/[pre-receive.d|post-receive.d|update.d]/gitea, path is hard-coded in full such as `/faronear/git/gitea/gitea hook --config=/faronear/git/gitea/custom/conf/app.ini`, you need to replace it if the path is changed."
echo "[20230305] noticed that gitea 1.18.5 default is `/usr/local/bin/gitea hook --config=/data/gitea/conf/app.ini`"
echo "Enter <old hook path> or <leave blank> for default '/faronear/git/gitea/gitea':"
echo "Enter [old hook path] or [leave blank] for default '/faronear/git/gitea/gitea':"
read -p ">>> " OLDPATH
if [ ! "$OLDPATH"]
then
OLDPATH=/faronear/git/gitea/gitea
fi
echo "Enter <new hook path> or <leave blank> for default '/usr/local/bin/gitea': "
echo "Enter [new hook path] or [leave blank] for default '/usr/local/bin/gitea': "
read -p ">> " NEWPATH
if [ ! "$NEWPATH" ]
then