Репозитории ALT
S: | 10.85.04-alt2 |
5.1: | 10.35.32-alt1.M51.1 |
4.1: | 10.35.32-alt1.M41.1 |
4.0: | 10.35.32-alt1.M40.1 |
3.0: | 10.26.4-alt1 |
Группа :: Графика
Пакет: netpbm
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: netpbm-10.29-alt-ppmquantall-tmp.patch
Скачать
Скачать
--- netpbm-10.29/editor/ppmquantall- 2005-03-16 23:44:03 +0000
+++ netpbm-10.29/editor/ppmquantall 2005-10-04 16:50:28 +0000
@@ -63,11 +63,15 @@ for i in ${files[@]}; do
heights=(${heights[*]} `grep -v '^#' $i | sed '1d; s/.* //; 2q'`)
done
-tempdir="${TMPDIR-/tmp}/ppmquantall.$$"
-mkdir $tempdir || { echo "Could not create temporary file. Exiting."; exit 1;}
-chmod 700 $tempdir
-
-trap 'rm -rf $tempdir' 0 1 3 15
+exit_handler()
+{
+ local rc=$?
+ trap - EXIT
+ rm -rf -- "$tempdir"
+ exit $rc
+}
+tempdir=`mktemp -d -t ppmquantall.XXXXXXXX` || exit 1
+trap exit_handler EXIT HUP INT QUIT PIPE TERM
all=$tempdir/pqa.all.$$