Explorar o código

handle emptey parameter added

Ralf Beckesch hai 5 días
pai
achega
8c34572f84
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      bin/executable_chezmoi_create-custom.sh

+ 6 - 0
bin/executable_chezmoi_create-custom.sh

@@ -5,6 +5,12 @@ name="$1"
 prefix="chezmoi"
 postfix="sh"
 
+if [ -z "$name" ]; then
+	echo -e "\n$(basename $0) realm\n"
+	exit 0
+fi
+
+
 fn="$HOME/bin/$prefix-$name.$postfix"
 config="$HOME/.config/chezmoi-$name/chezmoi.toml"
 dir="$HOME/.local/share/chezmoi-$name"