We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
mktemp
cmp
1 parent a57dbe5 commit f193f8aCopy full SHA for f193f8a
templates/update_had_no_effect.sh.epp
@@ -5,12 +5,13 @@
5
| -%>
6
7
DIR='var/cache/apt'
8
-EVAL="$(mktemp)"
+EVAL="$(mktemp)" || EVAL=/tmp/aptdir
9
apt-config shell DIR Dir::Cache > "$EVAL" && . "$EVAL"
10
cd "/$DIR" || exit 0
11
-OLD="$(mktemp -p "/$DIR")"
+export TMPDIR="/$DIR"
12
CUR=pkgcache.bin
13
apt-config shell CUR DIR::Cache::pkgcache >"$EVAL" && . "$EVAL"
14
+OLD="$(mktemp)" || OLD="/${DIR}/${CUR}.old"
15
rm -f "$EVAL"
16
ln -f "$CUR" "$OLD"
17
TRIES=<%= $tries %>
@@ -24,7 +25,7 @@ while true; do
24
25
sleep 1
26
TRIES=$(( TRIES - 1 ))
27
done
-cmp "$CUR" "$OLD"
28
-SAME=$?
+SAME=1
29
+cmp "$CUR" "$OLD" && SAME=0
30
rm -f "$OLD"
31
exit $SAME
0 commit comments