Now supports local directory.

Version 20130902.2 - 02/Sep/2013
  - Added install from file or directoy:
    slackpkg {install|upgrade} file:test-1.0-noarch-1
    slackpkg {install|upgrade} file:./
    You can optionally specify relative path or absolute path for file.
This commit is contained in:
Matteo Rossini 2013-09-02 16:20:59 +02:00
parent 07d73c1519
commit 1dd5dc128c
3 changed files with 24 additions and 4 deletions

View file

@ -1,5 +1,7 @@
Version 20130902.1 - 02/Sep/2013
- Added install from file: slackpkg {install|upgrade} file:test-1.0-noarch-1
Version 20130902.2 - 02/Sep/2013
- Added install from file or directoy:
slackpkg {install|upgrade} file:test-1.0-noarch-1
slackpkg {install|upgrade} file:./
You can optionally specify relative path or absolute path for file.
Version 0.9.6.1 - 02/Sep/2013

View file

@ -1,5 +1,7 @@
Version 20130902.1 - 02/Sep/2013
- Added install from file: slackpkg {install|upgrade} file:test-1.0-noarch-1
Version 20130902.2 - 02/Sep/2013
- Added install from file or directoy:
slackpkg {install|upgrade} file:test-1.0-noarch-1
slackpkg {install|upgrade} file:./
You can optionally specify relative path or absolute path for file.
Version 0.9.6.1 - 02/Sep/2013

View file

@ -490,6 +490,22 @@ if [ "$SLACKPKGPLUS" = "on" ];then
PRIORITYLIST=( ${PRIORITYLIST[*]} SLACKPKGPLUS_${repository}:$package )
REPOPLUS=( ${repository} ${REPOPLUS[*]} )
package=$(cutpkg $package)
elif echo "$pref" | egrep -q -e "file:.*/$" -e "file:\.$"; then
localpath=$(echo "$pref" | cut -f2- -d":")
if [ ! -d "$localpath" ];then
continue
fi
repository=file$(cat ${TMPDIR}/pkglist-pre|wc -l)
if [ ${localpath:0:1} != "/" ];then
localpath=$(pwd)/$localpath
fi
( cd $localpath
ls -ld *.t[blxg]z|tac|grep ^-|awk '{print "./SLACKPKGPLUS_'$repository'/"$NF}'|awk -f /usr/libexec/slackpkg/pkglist.awk >> ${TMPDIR}/pkglist-pre
)
MIRRORPLUS[$repository]="file:/$localpath"
PRIORITYLIST=( ${PRIORITYLIST[*]} SLACKPKGPLUS_${repository}:.* )
REPOPLUS=( ${repository} ${REPOPLUS[*]} )
package=SLACKPKGPLUS_$repository
elif echo "$pref" | grep -q "[a-zA-Z0-9]\+[:][a-zA-Z0-9]\+" ; then