diff --git a/generate-24px-versions.sh b/generate-24px-versions.sh index 3a415cef..43a0e372 100644 --- a/generate-24px-versions.sh +++ b/generate-24px-versions.sh @@ -1,45 +1,51 @@ #!/bin/sh OUTPUT_DIR=$1 for INPUT_FILE in {devices,actions,places,status}/22/*.svg; do OUTPUT_FILE="$OUTPUT_DIR/${INPUT_FILE/22/24}" if [ ! -d $(dirname $OUTPUT_FILE) ] ; then mkdir -p $(dirname $OUTPUT_FILE) fi # It's a symlink to another icon; make a link to mirror the one for the 22px version if [ -L $INPUT_FILE ] ; then LINK_TARGET=$(readlink $INPUT_FILE) ln -fsn $LINK_TARGET $OUTPUT_FILE # It's a file; make a 24px version of it else cp $INPUT_FILE $OUTPUT_FILE # Change the size of the bounding box if grep --quiet '"0 0 22 22' $OUTPUT_FILE; then sed -i 's/"0 0 22 22/"0 0 24 24/g' $OUTPUT_FILE # YOU elif grep --quiet 'width="22"' $OUTPUT_FILE; then sed -i 's/width="22"/width="24"/g' $OUTPUT_FILE sed -i 's/height="22"/height="24"/g' $OUTPUT_FILE else echo $INPUT_FILE does not have the size defined in a parse-able way exit 1 fi # Group all the paths and transform them to fit in the center of a 24px box if grep --quiet "" $OUTPUT_FILE; then sed -i 's|||g' $OUTPUT_FILE elif grep --quiet "" $OUTPUT_FILE; then sed -i 's|||g' $OUTPUT_FILE else # No stylesheet or defs tag; put the group at the end of the opening svg tag sed -i 's|||g' $OUTPUT_FILE fi # Add the closing group tag sed -i 's|||g' $OUTPUT_FILE fi done + + +# Make the @2x hidpi compatibility dirs +for ICON_DIR in devices actions places status; do + ln -fsn 24 $OUTPUT_DIR/$ICON_DIR/24@2x +done diff --git a/icons-dark/actions/24@2x b/icons-dark/actions/24@2x deleted file mode 120000 index cabf43b5..00000000 --- a/icons-dark/actions/24@2x +++ /dev/null @@ -1 +0,0 @@ -24 \ No newline at end of file diff --git a/icons/actions/24@2x b/icons/actions/24@2x deleted file mode 120000 index cabf43b5..00000000 --- a/icons/actions/24@2x +++ /dev/null @@ -1 +0,0 @@ -24 \ No newline at end of file