[Bash-completion-commits] [SCM] debian-package branch, master, updated. debian/1.3-3-1-ga8bc05d

David Paleino dapal at debian.org
Mon Apr 25 20:29:32 UTC 2011


The following commit has been merged in the master branch:
commit a8bc05dfd8a1e08f48de37266987467d5b59ee19
Author: David Paleino <dapal at debian.org>
Date:   Mon Apr 25 22:29:20 2011 +0200

    More checks in update-bash-completion: avoid unnecessary sourcing of completion if symlink already exists

diff --git a/debian/changelog b/debian/changelog
index 9c28ffc..b933c6e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+bash-completion (1:1.3-4) UNRELEASED; urgency=low
+
+  * More checks in update-bash-completion: avoid unnecessary
+    sourcing of completion if symlink already exists
+
+ -- David Paleino <dapal at debian.org>  Mon, 25 Apr 2011 22:28:32 +0200
+
 bash-completion (1:1.3-3) experimental; urgency=low
 
   * Include install-completions from upstream
diff --git a/debian/extra/scripts/update-bash-completion b/debian/extra/scripts/update-bash-completion
index c20fdce..42b043a 100755
--- a/debian/extra/scripts/update-bash-completion
+++ b/debian/extra/scripts/update-bash-completion
@@ -53,6 +53,12 @@ case $UNAME in
 esac
 
 for script in $completion_dir/*; do
+    dest=$installation_dir/$(basename $script)
+
+    if [ -L "$dest" ]; then
+    continue
+    fi
+
     # reset completion
     complete -r
 
@@ -67,7 +73,7 @@ for script in $completion_dir/*; do
     fi
 
     if [ -n "$installation_dir" ]; then
-	ln -sf $script $installation_dir/$(basename $script)
+	ln -sf $script $dest
     else
 	echo "$script OK"
     fi

-- 
debian-package



More information about the Bash-completion-commits mailing list