Script to create module folder
parent
36016c1a75
commit
536cf0e4e9
|
@ -0,0 +1,24 @@
|
||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
modulnr=$1
|
||||||
|
#echo $modulnr
|
||||||
|
if [ "$#" -ne 1 ]; then
|
||||||
|
echo "Usage: $0 NUMBER" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! [ -d "modul$modulnr" ]; then
|
||||||
|
|
||||||
|
mkdir modul$modulnr
|
||||||
|
cd modul$modulnr
|
||||||
|
cp -s ../modul1/index.css ./
|
||||||
|
cp -s ../modul1/index.php ./
|
||||||
|
cp -s ../modul1/common.php ./
|
||||||
|
cp ../mal.php "./index$(echo $modulnr)_1.php"
|
||||||
|
echo "OK"
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "Module already created"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue