mkdir -p _/DEBIAN
./control.sh _ >_/DEBIAN/control
- find _ -name '*.png' -exec ./pngcrush.sh '{}' ';'
+ find _ -name '*.png' -exec ./pngcrush.sh '{}' '{}' ';'
find _ -exec touch -t "$$(date -j -f "%s" +"%Y%m%d%H%M.%S" "$$(git show --format='format:%ct' | head -n 1)")" {} ';'
sudo chown -R 0 _
#!/bin/bash
png=$1
+out=$2
+
steps=()
function step() {
pngcrush=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush
-grep CgBI "${png}" &>/dev/null && exit 0
+if grep CgBI "${png}" &>/dev/null; then
+ if [[ ${png} != ${out} ]]; then
+ cp -a "${png}" "${out}"
+ fi
+
+ exit 0
+fi
step cp -fa "${png}" __.png
#"${pngcrush}" -q -iphone _.png 2.png
#ls -la 1.png 2.png
-mv -f _.png "${png}"
+mv -f _.png "${out}"
echo -n "${png##*/} "
for ((i = 0; i != ${#steps[@]}; ++i)); do