]> git.nbdom.net Git - nb.git/commitdiff
etc/profile.d/git.sh
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 12 Jan 2018 05:32:46 +0000 (05:32 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 12 Jan 2018 05:32:46 +0000 (05:32 +0000)
etc/profile.d/git.sh

index 0f45b1874184236443e85e6f562b8ce7a3a57e8e..0ff2d0c7f0d3293e99e88e1456fa9881a12e209d 100644 (file)
@@ -245,7 +245,7 @@ echo -e $output | column -t -s ', '
 git_clone_and_clean() {
   local usage="git_clean_repo REPO"
   local repo=${1:-?$usage}
-  local tmp=/tmp/git_clone_and_clean
+  local tmp=/tmp/git_clone_and_clean.$$
 (
   rm -rf "$tmp"
   mkdir -p "$tmp"
@@ -266,4 +266,5 @@ git_clone_and_clean() {
   git push origin --force --all || return
   git push origin --force --tags || return
 )
+  rm -rf "$tmp"
 }