]> git.wh0rd.org - chrome-ext/clearhistory-advance-fork.git/commitdiff
dist: drop pngcrush in favor of imgcrush main
authorMike Frysinger <vapier@gentoo.org>
Thu, 17 Jul 2025 20:12:08 +0000 (16:12 -0400)
committerMike Frysinger <vapier@gentoo.org>
Thu, 17 Jul 2025 20:12:08 +0000 (16:12 -0400)
dist/pngcrush.sh [deleted file]

diff --git a/dist/pngcrush.sh b/dist/pngcrush.sh
deleted file mode 100755 (executable)
index f302a2e..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/bash -xe
-# Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-size()
-{
-  stat -c %s "$@"
-}
-
-do_apngopt()
-{
-  local png new
-
-  for png in "$@"; do
-    new="${png}.new"
-    apngopt "${png}" "${new}"
-    if [[ $(size "${png}") -gt $(size "${new}") ]]; then
-      mv "${new}" "${png}"
-    else
-      rm "${new}"
-    fi
-  done
-}
-
-do_pngcrush()
-{
-  local png new
-
-  pngcrush -e .png.new "$@"
-  for png in "$@"; do
-    new="${png}.new"
-    mv "${new}" "${png}"
-  done
-}
-
-main()
-{
-  if [ $# -eq 0 ]; then
-    set -- $(find -name '*.png')
-  fi
-
-  if type -P apngopt >/dev/null; then
-    # apngopt likes to corrupt images.
-    : do_apngopt "$@"
-  elif type -P pngcrush >/dev/null; then
-    do_pngcrush "$@"
-  else
-    echo "error: could not find apngopt or pngcrush"
-    exit 1
-  fi
-}
-main "$@"