diff --git a/README b/README index ffd31bde406..91f0bad2c83 100644 --- a/README +++ b/README @@ -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. ------------------------------------------------------------------------------ diff --git a/pkgfs.sh b/pkgfs.sh index baed60c5e95..be01125519f 100755 --- a/pkgfs.sh +++ b/pkgfs.sh @@ -87,24 +87,26 @@ set_defvars() usage() { cat << _EOF -$progname: [-bCef] [-c ] +$progname: [-bCefi] [-c ] Targets - info Show information about . - install Build and install package from . + info Show information about . + install Build and install package from . list Lists and prints short description about installed packages. remove Remove package completely (unstow and remove from destdir) - stow Create symlinks from in master directory. - unstow Remove symlinks from in master directory. + stow Create symlinks from in master directory. + unstow Remove symlinks from 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