Skip to content

Commit a17d9ea

Browse files
committed
[FEATURE] bash script to copy directory
make it possible to create a custom theme by copying modernpackage and rename all occurrences to the new name
1 parent c013297 commit a17d9ea

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

create_theme.sh

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#! /bin/bash
2+
3+
DIR="$1"
4+
5+
if [ $# -ne 1 ]
6+
then
7+
echo "Usage: $0 {new extension key}"
8+
exit 1
9+
fi
10+
11+
if [ -d "../$DIR" ]
12+
then
13+
echo "Directory/extension '$DIR' exists already!"
14+
else
15+
cp -rf "../modernpackage" "../$DIR"
16+
echo "$DIR created."
17+
cd ../$DIR && grep -rl modernpackage . |xargs sed -i -e "s/modernpackage/$DIR/"
18+
echo "Changed all occurrences of modernpackage to $DIR."
19+
echo "Have fun with your theme!"
20+
fi

0 commit comments

Comments
 (0)