This commit is contained in:
vinceliuice 2022-05-12 22:09:52 +08:00
parent 923ef117c8
commit e31ad8ac62
2 changed files with 19 additions and 19 deletions

View file

@ -317,7 +317,7 @@ signal_error() {
prompt -e "GNOME : ${GNOME_VERSION}" prompt -e "GNOME : ${GNOME_VERSION}"
prompt -e "REPO : ${repo_ver}\n" prompt -e "REPO : ${repo_ver}\n"
if [[ $(grep -ril "repository" "${WHITESUR_TMP_DIR}/error_log.txt") = "error_log.txt" ]]; then if [[ "$(grep -ril "Release" "${WHITESUR_TMP_DIR}/error_log.txt")" == "${WHITESUR_TMP_DIR}/error_log.txt" ]]; then
prompt -i "HINT: You can run: 'sudo apt install sassc libglib2.0-dev libxml2-utils' on ubuntu 18.04 or 'sudo apt install sassc libglib2.0-dev-bin' on ubuntu >= 20.04 \n" prompt -i "HINT: You can run: 'sudo apt install sassc libglib2.0-dev libxml2-utils' on ubuntu 18.04 or 'sudo apt install sassc libglib2.0-dev-bin' on ubuntu >= 20.04 \n"
fi fi

View file

@ -8,11 +8,11 @@ INDEX="assets.txt"
for i in `cat $INDEX`; do for i in `cat $INDEX`; do
for color in '-dark' '-light'; do for color in '-dark' '-light'; do
for theme in '' '-nord'; do for theme in '' '-nord'; do
for screen in '' '-hdpi' '-xhdpi'; do for screen in '' '-hdpi' '-xhdpi'; do
ASSETS_DIR="assets${color}${theme}${screen}" ASSETS_DIR="assets${color}${theme}${screen}"
SRC_FILE="assets${color}${theme}.svg" SRC_FILE="assets${color}${theme}.svg"
case "${screen}" in case "${screen}" in
-hdpi) -hdpi)
DPI='144' DPI='144'
;; ;;
@ -22,22 +22,22 @@ for i in `cat $INDEX`; do
*) *)
DPI='96' DPI='96'
;; ;;
esac esac
mkdir -p $ASSETS_DIR mkdir -p $ASSETS_DIR
if [ -f $ASSETS_DIR/$i.png ]; then if [ -f $ASSETS_DIR/$i.png ]; then
echo $ASSETS_DIR/$i.png exists. echo $ASSETS_DIR/$i.png exists.
else else
echo echo
echo Rendering $ASSETS_DIR/$i.png echo Rendering $ASSETS_DIR/$i.png
$INKSCAPE --export-id=$i \ $INKSCAPE --export-id=$i \
--export-id-only \ --export-id-only \
--export-dpi=$DPI \ --export-dpi=$DPI \
--export-filename=$ASSETS_DIR/$i.png $SRC_FILE >/dev/null \ --export-filename=$ASSETS_DIR/$i.png $SRC_FILE >/dev/null \
&& $OPTIPNG -o7 --quiet $ASSETS_DIR/$i.png && $OPTIPNG -o7 --quiet $ASSETS_DIR/$i.png
fi fi
done done
done done
done done
done done