From: Richard Hartmann Date: Thu, 19 Sep 2013 21:37:33 +0000 (+0200) Subject: Merge branch 'master' of github.com:RichiH/vcsh X-Git-Url: https://git.madduck.net/code/vcsh.git/commitdiff_plain/b81e4c5cd981a4ca32317f93510a62d04d1e6456?ds=inline;hp=-c Merge branch 'master' of github.com:RichiH/vcsh --- b81e4c5cd981a4ca32317f93510a62d04d1e6456 diff --combined vcsh index 1fc78e2,d6ee234..cf0c8cf --- a/vcsh +++ b/vcsh @@@ -365,7 -365,11 +365,11 @@@ write_gitignore() file="$new" done; done | sort -u) - tempfile=$(mktemp) || fatal "could not create tempfile" 51 + + # Contrary to GNU mktemp, mktemp on BSD/OSX requires a template for temp files + # Use the template GNU mktemo defaults to + tempfile=$(mktemp tmp.XXXXXXXXXX) || fatal "could not create tempfile" 51 + echo '*' > "$tempfile" || fatal "could not write to '$tempfile'" 57 for gitignore in $gitignores; do echo "$gitignore" | sed 's@^@!/@' >> "$tempfile" || fatal "could not write to '$tempfile'" 57 @@@ -395,7 -399,6 +399,7 @@@ if [ "$1" = 'clone' ]; the export GIT_DIR="$VCSH_REPO_D/$VCSH_REPO_NAME.git" elif [ "$1" = 'version' ]; then echo "$SELF $VERSION" + git version exit elif [ "$1" = 'which' ]; then [ -z "$2" ] && fatal "$1: please specify a filename" 1