20130905.2 substitute

slackpkg install file:path/
with
	slackpkg install dir:path
(you does not need the final /)

slackpkg install file:filename.txz remain unmodified
This commit is contained in:
Matteo Rossini 2013-09-05 00:32:43 +02:00
parent 100bc2d929
commit 027e82578b
4 changed files with 15 additions and 15 deletions

View file

@ -1,5 +1,5 @@
Version 20130904.1 - 04/Sep/2013
- Added install/upgrade from disk (file:package.txz or file:path/)
Version 20130905.2 - 05/Sep/2013
- Added install/upgrade from disk (file:package.txz or dir:path)
please, read the README file
Version 0.9.6.1 - 02/Sep/2013

View file

@ -1,5 +1,5 @@
Version 20130904.1 - 04/Sep/2013
- Added install/upgrade from disk (file:package.txz or file:path/)
Version 20130905.2 - 05/Sep/2013
- Added install/upgrade from disk (file:package.txz or dir:path)
please, read the README file
Version 0.9.6.1 - 02/Sep/2013

View file

@ -58,7 +58,7 @@ accept:
4b) repository-name, for example slackpkg install ktown - install all packages in ktown repository
5) repository-name:package-name, for example slackpkg install slacky:openjdk - install slacky openjdk even if that repository is not the first in order
6) file:local-file-name (txz/tgz), for example slackpkg install file:mypackage-1.0-noarch-1my.txz - install mypackage even if not defined in slackpkgplus.con; you can optionally specify relative or absolute path
7) file:directory/, for example slackpkg {install|upgrade} file:/root/myrepo/ (do not forget the final '/') - install or upgrade all packages in path (note: 'slackpkg install .' is an alias of 'slackpkg install file:./', but 'slackpkg install ./' is NOT the same alias; search FILE in man slackpkg)
7) dir:directory, for example slackpkg {install|upgrade} dir:/root/myrepo (do not strictly require the final '/') - install or upgrade all packages in path (note: 'slackpkg install .' is an alias of 'slackpkg install dir:./', but 'slackpkg install ./' is NOT the same alias; search FILE in man slackpkg)
-----
@ -145,12 +145,12 @@ You can:
or
# slackpkg upgrade file:../repo/package-2.0-noarch-1my.txz
2) install/upgrade/reinstall all file packages in a single directory (does not allow subtree) by passing the directory name following the "/" simbol (optionally absolute or relative path):
# slackpkg install file:/myrepo/
# slackpkg upgrade file:./test/packages/
# slackpkg install dir:/myrep
# slackpkg upgrade dir:./test/package/
# slackpkg reinstall .
'.' is an alias of 'file:./', but only that alias exists. slackpkg install ./ or /myrepo/ or ./package.txz generate an error becouse in standard slackpkg you can specify a FILE as input, so in 'slackpkg install ./list.txt' list.txt must to be a plain file containing a list of packages to install (see man slackpkg)
'.' is an alias of 'dir:./', but only that alias exists. slackpkg install ./ or /myrepo/ or ./package.txz generate an error becouse in standard slackpkg you can specify a FILE as input, so in 'slackpkg install ./list.txt' list.txt must to be a plain file containing a list of packages to install (see man slackpkg)
Tip: if you want to use file:/myrepo/ to track your installations and you have lost the original txz/tgz file, you can simply create an empty file; this fools slackpkg+ that only search for file name and not for contents (unless you do not run slackpkg reinstall on these packages ;))
Tip: if you want to use dir:/myrepo to track your installations and you have lost the original txz/tgz file, you can simply create an empty file; this fools slackpkg+ that only search for file name and not for contents (unless you do not run slackpkg reinstall on these packages ;))
by doing
# touch mypkg1-1.0-noarch-1my.tgz

View file

@ -148,7 +148,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
local MD5DOWNLOAD
local PREPO
if echo $1|grep -q /SLACKPKGPLUS_file[0-9];then
if echo $1|grep -q -e /SLACKPKGPLUS_file[0-9] -e /SLACKPKGPLUS_dir[0-9];then
echo 1
return
fi
@ -481,7 +481,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
for pref in $INPUTLIST ; do
if [ "$pref" == "." ];then
pref="file:./"
pref="dir:./"
fi
if echo "$pref" | egrep -q "file:.*\.t.z$" ; then
package=$(echo "$pref" | cut -f2- -d":")
@ -490,18 +490,18 @@ if [ "$SLACKPKGPLUS" = "on" ];then
if [ ${localpath:0:1} != "/" ];then
localpath=$(pwd)/$localpath
fi
repository=file$(cat ${TMPDIR}/pkglist-pre|wc -l)
repository=file$(grep ^SLACKPKGPLUS_file ${TMPDIR}/pkglist-pre|wc -l)
echo "./SLACKPKGPLUS_$repository/$package"|awk -f /usr/libexec/slackpkg/pkglist.awk >> ${TMPDIR}/pkglist-pre
MIRRORPLUS[$repository]="file:/$localpath/"
PRIORITYLIST=( ${PRIORITYLIST[*]} SLACKPKGPLUS_${repository}:$package )
REPOPLUS=( ${repository} ${REPOPLUS[*]} )
package=$(cutpkg $package)
elif echo "$pref" | egrep -q "file:.*/$"; then
localpath=$(echo "$pref" | cut -f2- -d":")
elif [ "${pref:0:4}" = "dir:" ]; then
localpath=$(echo "$pref" | cut -f2- -d":"|sed 's_/$__')
if [ ! -d "$localpath" ];then
continue
fi
repository=file$(cat ${TMPDIR}/pkglist-pre|wc -l)
repository=dir$(grep ^SLACKPKGPLUS_dir ${TMPDIR}/pkglist-pre|wc -l)
if [ ${localpath:0:1} != "/" ];then
localpath=$(pwd)/$localpath
fi