-
Notifications
You must be signed in to change notification settings - Fork 9
/
package.sh
executable file
·51 lines (40 loc) · 1.23 KB
/
package.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env bash
# Numix icon themes packaging script, v0.2
# GPLv3+ Licensed, Copyright 2020, Numix Project
themes=("circle" "square")
# ensure it has the core repo downloaded and up to date
if [ ! -d "core/" ]; then
git clone [email protected]:numixproject/numix-core.git core
cd core/
else
cd core/ && git pull
fi
for theme in "${themes[@]}"; do
# build the latest theme from git
./gen.py --platform linux --theme $theme
cd ../
# ensure it has the theme packaging repo downloaded and up to date
if [ ! -d "$theme" ]; then
cd $theme
else
cd $theme && git pull
fi
# replace the theme app dir with the newly built one
dir="Numix-${theme^}/48/apps"
rm -r $dir
mv ../core/numix-icon-theme-$theme/$dir $dir
# check if changes to make
if ! git diff-index --quiet HEAD --; then
git add $dir
git commit -m "Icons from $(date +%y.%m.%d)"
git push origin master
fi
# tag the new releases if "--tag" flag used
if [ "$1" == "--tag" ]; then
git tag "$(date +%y.%m.%d)"
git push --tags
fi
# return to core directory
cd ../core
done