Merge pull request #289 from mavant/feature/mktemp

Use mktemp for temporary files.
This commit is contained in:
hemanth.hm 2014-12-05 09:17:03 +05:30
commit 5596354446
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