소스 검색

handle emptey parameter added

Ralf Beckesch 5 일 전
부모
커밋
8c34572f84
1개의 변경된 파일과 6개의 추가작업 그리고 0개의 파일을 삭제
  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"