From c3c7560cce34a584f0a20a8fcf251a40284d3d26 Mon Sep 17 00:00:00 2001 From: coolneng Date: Thu, 2 Jun 2022 23:05:53 +0200 Subject: [PATCH] Remove redundant else clause from subject script --- scripts/.local/share/scripts/subject | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/.local/share/scripts/subject b/scripts/.local/share/scripts/subject index e17dfe5..cfdd97c 100755 --- a/scripts/.local/share/scripts/subject +++ b/scripts/.local/share/scripts/subject @@ -1,5 +1,6 @@ #!/bin/sh + if [ $# -lt 2 ]; then echo "Usage: subject " echo "subject type 0: programming" @@ -10,11 +11,10 @@ fi name=$1 type=$2 +mkdir -p "$name"/Labs +mkdir -p "$name"/Exercises +touch "$name"/.project + if [ "$type" -eq 0 ]; then mkdir -p "$name"/Code - mkdir -p "$name"/Labs - mkdir -p "$name"/Exercises -else - mkdir -p "$name"/Labs - mkdir -p "$name"/Exercises fi