Remove redundant else clause from subject script

This commit is contained in:
coolneng 2022-06-02 23:05:53 +02:00
parent 8ce73375bc
commit c3c7560cce
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,6 @@
#!/bin/sh #!/bin/sh
if [ $# -lt 2 ]; then if [ $# -lt 2 ]; then
echo "Usage: subject <subject name> <subject type>" echo "Usage: subject <subject name> <subject type>"
echo "subject type 0: programming" echo "subject type 0: programming"
@ -10,11 +11,10 @@ fi
name=$1 name=$1
type=$2 type=$2
mkdir -p "$name"/Labs
mkdir -p "$name"/Exercises
touch "$name"/.project
if [ "$type" -eq 0 ]; then if [ "$type" -eq 0 ]; then
mkdir -p "$name"/Code mkdir -p "$name"/Code
mkdir -p "$name"/Labs
mkdir -p "$name"/Exercises
else
mkdir -p "$name"/Labs
mkdir -p "$name"/Exercises
fi fi