1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-05-17 01:33:22 -07:00

make install script less noisy by default

This commit is contained in:
Connor Olding 2022-10-12 23:12:48 +02:00
parent c4b191b305
commit c0b0cf78ed

View File

@ -2,7 +2,7 @@
# this script is compatible with following shells: # this script is compatible with following shells:
# ash, dash, bash, zsh # ash, dash, bash, zsh
VERBOSE="${VERBOSE:-1}" VERBOSE="${VERBOSE-1}"
NAME="$0" NAME="$0"
@ -73,11 +73,11 @@ softlink_pseudo() {
if [ -d "$d2" ]; then if [ -d "$d2" ]; then
if [ "$d1" != ".vim/bundle" ]; then # buggy on Windows if [ "$d1" != ".vim/bundle" ]; then # buggy on Windows
[ "$VERBOSE" -lt 1 ] || printf '\033[34m / \033[0m %s %s\n' "$d1" "$d2" >&2 [ "$VERBOSE" -lt 2 ] || printf '\033[34m / \033[0m %s %s\n' "$d1" "$d2" >&2
softlink_pseudo "$d1" "$d2" || exit softlink_pseudo "$d1" "$d2" || exit
fi fi
elif [ -f "$d2" ]; then elif [ -f "$d2" ]; then
[ "$VERBOSE" -lt 1 ] || printf '\033[34m * \033[0m %s\n' "$d1" >&2 [ "$VERBOSE" -lt 2 ] || printf '\033[34m * \033[0m %s\n' "$d1" >&2
hardlink "$d1" "$d2" || exit hardlink "$d1" "$d2" || exit
else else
die "i don't know how to pseudo-symlink $d2" die "i don't know how to pseudo-symlink $d2"