spk diff spk-add @ rev 24
spk-add: we should use new style (also lot of clean is needed
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue May 15 17:47:22 2012 +0200 (2012-05-15) |
parents | 8fd53f8759ad |
children | 3cca155b72a7 |
line diff
1.1 --- a/spk-add Tue May 15 16:59:57 2012 +0200 1.2 +++ b/spk-add Tue May 15 17:47:22 2012 +0200 1.3 @@ -326,7 +326,7 @@ 1.4 [ "$(dd if=$1 bs=1 skip=1 count=3 2> /dev/null)" = "ELF" ] 1.5 } 1.6 1.7 -# Print shared library dependencies 1.8 +# Print shared library dependencies: we have /usr/bin/ldd 1.9 ldd() { 1.10 LD_TRACE_LOADED_OBJECTS=1 /lib/ld*.so $1 2> /dev/null 1.11 } 1.12 @@ -362,11 +362,21 @@ 1.13 fi 1.14 } 1.15 1.16 +# Old style 1.17 case $1 in 1.18 install|-i) 1.19 - install_pkg $2 $3 ;; 1.20 + install_pkg $2 $3 1.21 + exit 0 ;; 1.22 get-install|-gi) 1.23 - get_install $2 ;; 1.24 - *) 1.25 - usage ;; 1.26 + get_install $2 1.27 + exit 0 ;; 1.28 + "") usage ;; 1.29 esac 1.30 + 1.31 +# Usage: spk-add package ... packageN 1.32 +for pkg in $@ 1.33 +do 1.34 + [ -d "$installed/$pkg" ] && continue 1.35 + echo "Adding: $pkg" 1.36 +done 1.37 +exit 0