Use mktemp for temporary file creation.

This commit is contained in:
Matthew Avant 2014-12-04 11:01:40 -08:00
parent ec83f827b1
commit 7701ba4069
3 changed files with 4 additions and 4 deletions

View file

@ -47,10 +47,10 @@ if test "$CHANGELOG" = ""; then
CHANGELOG='History.md';
fi
fi
tmp="/tmp/changelog"
tmp=`mktemp -t $(basename $0)`
printf "$HEAD" > $tmp
git-changelog $GIT_LOG_OPTS --list >> $tmp
printf '\n' >> $tmp
if [ -f $CHANGELOG ]; then cat $CHANGELOG >> $tmp; fi
mv $tmp $CHANGELOG
mv -f $tmp $CHANGELOG
test -n "$EDITOR" && $EDITOR $CHANGELOG

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
tmp="/tmp/.$(basename $0).$$"
tmp=`mktemp -t $(basename $0)`
above='0'
color=

View file

@ -15,7 +15,7 @@ then
fi
# Use a temporary index.
index="/tmp/$(basename $0).$$.tmp"
index=`mktemp -t $(basename $0)`
cleanup() {
rm $index
exit 2