assignment 1
This commit is contained in:
30
scripts/new.sh
Normal file
30
scripts/new.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/zsh
|
||||
|
||||
source scripts/common.sh
|
||||
|
||||
if [ -z "$1" ] || [ -z "$2" ]; then
|
||||
echo "Usage: $0 <assignment/practice> <project_name>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" = "assignment" ]; then
|
||||
DIR=$ASSIGNMENT_DIR
|
||||
elif [ "$1" = "practice" ]; then
|
||||
DIR=$PRACTICES_DIR
|
||||
else
|
||||
echo "Usage: $0 <assignment/practice> <project_name>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd $DIR
|
||||
mkdir -p $2
|
||||
cd $2
|
||||
|
||||
touch index.html
|
||||
|
||||
mkdir -p css
|
||||
cd css
|
||||
|
||||
cp $SHARED_DIR/common.css .
|
||||
echo "@import 'common.css';" >shared.css
|
||||
echo "@import 'shared.css';" >index.css
|
||||
Reference in New Issue
Block a user