# HG changeset patch # User Christophe Lincoln # Date 1337096842 -7200 # Node ID 2eefb6700d4b91ca4145b698c34082db51346adb # Parent 8fd53f8759ad0203fe70a44b33fad298c04a3754 spk-add: we should use new style (also lot of clean is needed diff -r 8fd53f8759ad -r 2eefb6700d4b spk-add --- a/spk-add Tue May 15 16:59:57 2012 +0200 +++ b/spk-add Tue May 15 17:47:22 2012 +0200 @@ -326,7 +326,7 @@ [ "$(dd if=$1 bs=1 skip=1 count=3 2> /dev/null)" = "ELF" ] } -# Print shared library dependencies +# Print shared library dependencies: we have /usr/bin/ldd ldd() { LD_TRACE_LOADED_OBJECTS=1 /lib/ld*.so $1 2> /dev/null } @@ -362,11 +362,21 @@ fi } +# Old style case $1 in install|-i) - install_pkg $2 $3 ;; + install_pkg $2 $3 + exit 0 ;; get-install|-gi) - get_install $2 ;; - *) - usage ;; + get_install $2 + exit 0 ;; + "") usage ;; esac + +# Usage: spk-add package ... packageN +for pkg in $@ +do + [ -d "$installed/$pkg" ] && continue + echo "Adding: $pkg" +done +exit 0