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 "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"
fi

View file

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