Added the flags "-i". Use it when you only want to build and install

a package into destdir but do not want to have it in masterdir.

Useful to test different versions, with incompatible ABI changes, etc.

--HG--
extra : convert_revision : cd13448fb92fdf0df6547477c7e9d7343bb197a0
This commit is contained in:
Juan RP 2008-10-02 03:52:21 +02:00
parent 7b9c3503fa
commit 61d42c32c7
2 changed files with 34 additions and 9 deletions

16
README
View File

@ -64,6 +64,22 @@ To list installed (stowned) packages, use this:
$ pkgfs.sh -c pkgfs.conf list
To only extract the distfile, without configuring/building/installing:
$ pkgfs.sh -c pkgfs.conf -i install foo-1.0
To not remove the build directory after successful installation:
$ pkgfs.sh -c pkgfs.conf -C install blah-1.0
To only fetch the distfile:
$ pkgfs.sh -c pkgfs.conf -e install blah-1.0
To only install the package, _without_ stowning it into the master directory:
$ pkgfs.sh -c pkgfs.conf -i install blob-4.0
That's all for now folks. I hope you find it useful, as I do.
------------------------------------------------------------------------------

View File

@ -87,24 +87,26 @@ set_defvars()
usage()
{
cat << _EOF
$progname: [-bCef] [-c <config_file>] <target> <tmpl>
$progname: [-bCefi] [-c <config_file>] <target> <tmplname>
Targets
info Show information about <tmpl>.
install Build and install package from <tmpl>.
info Show information about <tmplname>.
install Build and install package from <tmplname>.
list Lists and prints short description about installed packages.
remove Remove package completely (unstow and remove from destdir)
stow Create symlinks from <tmpl> in master directory.
unstow Remove symlinks from <tmpl> in master directory.
stow Create symlinks from <tmplname> in master directory.
unstow Remove symlinks from <tmplname> in master directory.
Options
-b Only build the source distribution file(s).
-b Only build the source distribution file(s), without
extracting or fetching before.
-C Do not remove build directory after successful build.
-c Path to global configuration file.
If not specified /usr/local/etc/pkgfs.conf is used.
-e Only extract the source distribution file(s).
-f Only fetch the source distribution file(s).
-i Only build and install the binary distribution file(s)
into the destdir directory, without stowning.
_EOF
exit 1
}
@ -872,7 +874,11 @@ install_tmpl()
fetch_tmpl_sources
extract_tmpl_sources
build_tmpl_sources
stow_tmpl ${pkgname}
#
# Do not stow the pkg if requested.
#
[ -z "$only_install" ] && stow_tmpl ${pkgname}
}
list_tmpls()
@ -916,7 +922,7 @@ remove_tmpl()
#
# main()
#
args=$(getopt bCc:ef $*)
args=$(getopt bCc:efi $*)
[ "$?" -ne 0 ] && usage
set -- $args
@ -938,6 +944,9 @@ while [ "$#" -gt 0 ]; do
-f)
only_fetch=yes
;;
-i)
only_install=yes
;;
--)
shift
break