summaryrefslogtreecommitdiffstats
path: root/contrib/pactree
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-10-07 22:50:29 +0200
committerDan McGee <dan@archlinux.org>2010-10-11 17:06:57 +0200
commit1e0e5b2a0241d1f3e298991c0d583afb9c80baef (patch)
treeef317bb8531e1b411f575ab0dffec41951de2be9 /contrib/pactree
parentdff73a2a69de1c55a0ba9fe75a9f7a900e5ed15b (diff)
downloadpacman-1e0e5b2a0241d1f3e298991c0d583afb9c80baef.tar.gz
pacman-1e0e5b2a0241d1f3e298991c0d583afb9c80baef.tar.xz
Remove use of `seq` in pactree
This is not a bash builtin, so can potentially cause portability issues. Additionally, the use of it is completely unnecessary as it can all be done within bash (and done faster). $ time pactree xfwm4 >/dev/null (old version) real 0m3.245s $ time ./contrib/pactree xfwm4 >/dev/null (new version) real 0m3.042s Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'contrib/pactree')
-rwxr-xr-xcontrib/pactree3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/pactree b/contrib/pactree
index 73bece3a..6051724e 100755
--- a/contrib/pactree
+++ b/contrib/pactree
@@ -130,9 +130,10 @@ _tree(){
# Generate the spacer
spacer=""
- for each in $(seq 1 $spaces); do
+ for ((count = 0; count < spaces; count++)); do
spacer="$spacer$separator"
done
+ unset count
spacer="$spacer$branch_tip"
[ $silent -ne 1 ] && echo -e "$branch_color$spacer$leaf_color$pkg_name$provided"