Quote variables in build_theme.sh to prevent word splitting

parent 53afd499
......@@ -4,8 +4,8 @@ create_folders () {
FOLDERS=(gtk-2.0 gtk-3.0 gtk-3.18 gtk-3.20)
for j in "${FOLDERS[@]}"
do
if ! [ -d $1/$j ]
then mkdir -p $1/$j;
if ! [ -d "$1/$j" ]
then mkdir -p "$1/$j";
fi
done
}
......@@ -20,17 +20,17 @@ build_sass() {
}
render_theme () {
python3 render_assets.py $1
create_folders $2
build_sass gtk316/gtk.scss $2/gtk-3.0/gtk.css
build_sass gtk318/gtk.scss $2/gtk-3.18/gtk.css
build_sass gtk320/gtk.scss $2/gtk-3.20/gtk.css
mv assets $2/
cp -R gtk2/* $2/gtk-2.0/
if [ -d $HOME/.local/share/themes/$2 ]
then rm -rf $HOME/.local/share/themes/$2;
python3 render_assets.py "$1"
create_folders "$2"
build_sass gtk316/gtk.scss "$2/gtk-3.0/gtk.css"
build_sass gtk318/gtk.scss "$2/gtk-3.18/gtk.css"
build_sass gtk320/gtk.scss "$2/gtk-3.20/gtk.css"
mv assets "$2/"
cp -R gtk2/* "$2/gtk-2.0/"
if [ -d "$HOME/.local/share/themes/$2" ]
then rm -rf "$HOME/.local/share/themes/$2";
fi
mv -f $2 $HOME/.local/share/themes/
mv -f "$2" "$HOME/.local/share/themes/"
}
if [ -z "$1" ]
......@@ -45,7 +45,7 @@ then
else
if [ -f "schemes/$1.colors" ]
then
render_theme schemes/$1.colors $1
render_theme "schemes/$1.colors" "$1"
else
echo "colorscheme $1 not found"
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment