Lines 168-174
Link Here
|
168 |
else |
168 |
else |
169 |
tmpdir="/tmp" |
169 |
tmpdir="/tmp" |
170 |
fi |
170 |
fi |
171 |
tmpfile="$tmpdir/.shtool.$$" |
171 |
if mkdir "$tmpdir/.shtool.$$"; then |
|
|
172 |
tmpfile="$tmpdir/.shtool.$$/shtool.tmp" |
173 |
else |
174 |
echo "$msgprefix:Error: failed to create temporary file" 1>&2 |
175 |
exit 1 |
176 |
fi |
177 |
tmpfile="$tmpdir/.shtool.$$/shtool.tmp" |
172 |
rm -f $tmpfile >/dev/null 2>&1 |
178 |
rm -f $tmpfile >/dev/null 2>&1 |
173 |
touch $tmpfile |
179 |
touch $tmpfile |
174 |
chmod 600 $tmpfile |
180 |
chmod 600 $tmpfile |
Lines 188-194
Link Here
|
188 |
shtool_exit () { |
194 |
shtool_exit () { |
189 |
rc="$1" |
195 |
rc="$1" |
190 |
if [ ".$gen_tmpfile" = .yes ]; then |
196 |
if [ ".$gen_tmpfile" = .yes ]; then |
191 |
rm -f $tmpfile >/dev/null 2>&1 || true |
197 |
rm -fr "$tmpdir/.shtool.$$" >/dev/null 2>&1 || true |
192 |
fi |
198 |
fi |
193 |
exit $rc |
199 |
exit $rc |
194 |
} |
200 |
} |