This commit is contained in:
vinceliuice
2024-07-18 19:35:13 +08:00
parent 6ae5a7bdbd
commit 1d09d1901f
2 changed files with 41 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
release/*.tar.xz

39
release/make-release.sh Executable file
View File

@@ -0,0 +1,39 @@
#! /bin/bash
THEME_DIR=$(cd $(dirname $0) && pwd)
THEME_NAME=Colloid
_THEME_VARIANTS=('' '-Purple' '-Pink' '-Red' '-Orange' '-Yellow' '-Green' '-Grey' '-Teal')
if [ ! -z "${COMPA_VARIANTS:-}" ]; then
IFS=', ' read -r -a _COMPA_VARIANTS <<< "${COMPA_VARIANTS:-}"
fi
if [ ! -z "${COLOR_VARIANTS:-}" ]; then
IFS=', ' read -r -a _COLOR_VARIANTS <<< "${COLOR_VARIANTS:-}"
fi
if [ ! -z "${THEME_VARIANTS:-}" ]; then
IFS=', ' read -r -a _THEME_VARIANTS <<< "${THEME_VARIANTS:-}"
fi
Tar_themes() {
for theme in "${_THEME_VARIANTS[@]}"; do
rm -rf "${THEME_NAME}${theme}.tar.xz"
done
for theme in "${_THEME_VARIANTS[@]}"; do
tar -Jcvf "${THEME_NAME}${theme}.tar.xz" "${THEME_NAME}${theme}"{'','-Light','-Dark'}
done
}
Clear_theme() {
for theme in "${_THEME_VARIANTS[@]}"; do
[[ -d "${THEME_NAME}${theme}" ]] && rm -rf "${THEME_NAME}${theme}"{'','-Light','-Dark'}
done
}
cd .. && ./install.sh -d $THEME_DIR -t all
cd $THEME_DIR && Tar_themes && Clear_theme