1
0
Fork 0
mirror of https://github.com/vinceliuice/WhiteSur-icon-theme.git synced 2024-11-25 15:20:09 +00:00
WhiteSur-icon-theme/release/make-release.sh
vinceliuice 7c3d567dd3 update
2024-08-07 00:31:49 +08:00

32 lines
758 B
Bash
Executable file

#! /bin/bash
THEME_DIR=$(cd $(dirname $0) && pwd)
THEME_NAME=WhiteSur
_THEME_VARIANTS=('' '-red' '-pink' '-purple' '-green' '-yellow' '-orange' '-grey' '-nord')
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 -a
cd $THEME_DIR && Tar_themes && Clear_theme