Sfoglia il codice sorgente

handle emptey parameter added

Ralf Beckesch 5 giorni fa
parent
commit
8c34572f84
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  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"