1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
#!/bin/bash
msg()
{
echo -en "$1"
}
die(){
msg "$1\n"
exit 1
}
[ -z "$1" -o -z "$2" ] && die "Missing argument"
SUBDIRS="12x12 16x16 26x26 34x34 40x40 50x50 250x250 scalable"
CATEGORIES="apps devices filesystems mimetypes hildon"
for d in $SUBDIRS; do
for s in $CATEGORIES; do
mkdir -p $2/$d/$s
done
done
pushd $2
for i in $1/*/*.png; do
eval $(basename `dirname $1` | awk -Fx '{ print "IX=" $1 " IY=" $2 }')
[ -n "$DH_VERBOSE" ] && echo "$i $IX $IY"
if [ "$IX" = "$IY" ]; then
[ -d "${IX}x${IY}/hildon" ] || die "Something wrong ? Directory ${IX}x${IY}/hildon missing"
cp -a $i ${IX}x${IY}/hildon/
else
cp -a $i scalable/hildon/
fi
done
# Workarounds for animations
cp -a $1/34x34/qgn_indi_tap_hold_a.ani 34x34/hildon/
cp -a $1/40x40/qgn_indi_batterycharging_a.ani 40x40/hildon/
#cp -a $1/50x50/qgn_indi_offmode_batterycharging_a.ani 50x50/hildon/
for i in 110x60/qgn_indi_copy_a.ani 22x24/qgn_indi_pball_a.ani 54x60/qgn_indi_process_a.ani 63x60/qgn_indi_send_a.ani 64x54/qgn_indi_send_recieve_a.ani 91x54/qgn_indi_delete_a.ani; do
cp -a $1/$i scalable/hildon/
done
popd
|