commit 7460a045a956e8e44ff05ca997c729acb8232e56 from: Sylvain Saboua date: Tue Apr 22 03:06:57 2025 UTC version 0.1 commit - 38c5f1b2c76d279c8847ab505b69c8aa191229b3 commit + 7460a045a956e8e44ff05ca997c729acb8232e56 blob - 1f89a8f0740fe6a77a51e73bd13e37152f7f867e blob + e4036f7ed751d16df0cfc5ab3adb343519d27bf4 --- nwpg.sh +++ nwpg.sh @@ -11,23 +11,27 @@ # syntax: nwpg [language] project_title case $# in - 0 ) - echo "Usage: nwpg [language] project_title" ;; - 1 ) + 0) + echo "Usage: nwpg [language] project_title" ; + return ;; + 1) project_title="$1" ;; 2) - project_title="$2" ; - case $1 in - C | c ) - file_ext="c" ;; - Python | Py | py ) - file_ext="py" ;; - Rust ) - file_ext="" - echo "Rust project" ;; - * ) - file_ext="" ;; - esac ;; + project_title="$2" ; + case $1 in + C | c ) + file_ext="c" ;; + Python | Py | py ) + file_ext="py" ;; + Rust ) + file_ext="" + echo "Rust project" ;; + * ) + file_ext="" ;; + esac ;; + *) + echo "Too many arguments" ; + return ;; esac mkdir -p $HOME/hack/$project_title ;