Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions aid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ shift $((OPTIND - 1))
ICON=$1

$CURL -s $SRC > $MATERIALS_HTML
cat $MATERIALS_HTML | $PERL -nle 'if($_=~/^<div><img src=.\.\/(.*\.svg).><br>(.*)<\/div>$/){print "$1"}' > $ICON_LIST
cat $MATERIALS_HTML | $PERL -nle 'if($_=~/^<img class="svg" data-src="(.*.svg)">$/){print "$1"}' > $ICON_LIST

ICON_SVG="ic_${ICON}_24px.svg"

Expand All @@ -99,8 +99,7 @@ if [ $EXIST_FLG -ne 1 ]; then
exit 1
fi

ICON_PATH=`cat $ICON_LIST | $GREP $ICON_SVG`
ICON_URL=$SRC$ICON_PATH
ICON_URL=`cat $ICON_LIST | $GREP $ICON_SVG`

echo "Downloading $ICON svg ..."
if ! $CURL -s -o /tmp/$ICON_SVG -O $ICON_URL; then
Expand Down