Do not require on install/remove commands to specify path to templates
directory, or full name to template files. Now you do: $ pkgfs.sh install perl-5.10.0 Removed the item from TODO, which was suggested by milosn@freenode. --HG-- extra : convert_revision : 55e41b27a940ed7d67ade5c185cbbfeb4d82c20a
This commit is contained in:
parent
37210e2d84
commit
7ea1076ab3
2 changed files with 20 additions and 9 deletions
7
README
7
README
|
@ -20,7 +20,10 @@ If PKGFS_CONFIG_FILE is not set or specified from the command line with the
|
||||||
Once that you read the "pkgfs.conf" file and configured it, you can start
|
Once that you read the "pkgfs.conf" file and configured it, you can start
|
||||||
installing packages by using the command:
|
installing packages by using the command:
|
||||||
|
|
||||||
$ pkgfs.sh -c pkgfs.conf install templates/glib-2.18.1.tmpl
|
$ pkgfs.sh -c pkgfs.conf install glib-2.18.1
|
||||||
|
|
||||||
|
Please note that it's assumed that PKGFS_TEMPLATESDIR is properly defined
|
||||||
|
and actually contains valid template files.
|
||||||
|
|
||||||
While installing your first package, if pkgfs couldn't find the Xstow program
|
While installing your first package, if pkgfs couldn't find the Xstow program
|
||||||
specified at the configuration file with PKGFS_XSTOW_CMD, the Xstow package
|
specified at the configuration file with PKGFS_XSTOW_CMD, the Xstow package
|
||||||
|
@ -55,7 +58,7 @@ and to unstow an already installed (stowned) package:
|
||||||
|
|
||||||
You can also print some stuff about any template, e.g:
|
You can also print some stuff about any template, e.g:
|
||||||
|
|
||||||
$ pkgfs.sh info templates/glib-2.18.1.tmpl
|
$ pkgfs.sh info glib-2.18.1
|
||||||
|
|
||||||
To list installed (stowned) packages, use this:
|
To list installed (stowned) packages, use this:
|
||||||
|
|
||||||
|
|
22
pkgfs.sh
22
pkgfs.sh
|
@ -29,7 +29,6 @@
|
||||||
#-
|
#-
|
||||||
#
|
#
|
||||||
# TODO
|
# TODO
|
||||||
# - milosn says: "pkgfs.sh -c pkgfs.conf build glib" work
|
|
||||||
# - Multiple distfiles in a package.
|
# - Multiple distfiles in a package.
|
||||||
# - Multiple URLs to download source distribution files.
|
# - Multiple URLs to download source distribution files.
|
||||||
# - Support GNU/BSD-makefile style source distribution files.
|
# - Support GNU/BSD-makefile style source distribution files.
|
||||||
|
@ -97,6 +96,9 @@ check_path()
|
||||||
eval local orig="$1"
|
eval local orig="$1"
|
||||||
|
|
||||||
case "$orig" in
|
case "$orig" in
|
||||||
|
$PKGFS_TEMPLATESDIR)
|
||||||
|
orig="$PKGFS_TEMPLATESDIR/$orig"
|
||||||
|
;;
|
||||||
/)
|
/)
|
||||||
;;
|
;;
|
||||||
/*)
|
/*)
|
||||||
|
@ -122,13 +124,13 @@ run_file()
|
||||||
info_tmpl()
|
info_tmpl()
|
||||||
{
|
{
|
||||||
local tmpl="$1"
|
local tmpl="$1"
|
||||||
if [ -z "$tmpl" -o ! -f "$tmpl" ]; then
|
if [ -z "$tmpl" -o ! -f "$PKGFS_TEMPLATESDIR/$tmpl.tmpl" ]; then
|
||||||
echo -n "*** ERROR: invalid template file '$tmpl',"
|
echo -n "*** ERROR: invalid template file '$tmpl'"
|
||||||
echo ", aborting ***"
|
echo ", aborting ***"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
run_file ${tmpl}
|
run_file ${PKGFS_TEMPLATESDIR}/${tmpl}.tmpl
|
||||||
|
|
||||||
echo " pkgfs template definitions:"
|
echo " pkgfs template definitions:"
|
||||||
echo
|
echo
|
||||||
|
@ -201,12 +203,18 @@ check_config_vars()
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$PKGFS_DEPSDIR" ]; then
|
if [ ! -d "$PKGFS_DEPSDIR" ]; then
|
||||||
echo -n "**** ERROR: PKGFS_DEPSDIR not set in configuration "
|
echo -n "**** ERROR: PKGFS_DEPSDIR not set in configuration "
|
||||||
echo "file, aborting ***"
|
echo "file, aborting ***"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "$PKGFS_TEMPLATESDIR" ]; then
|
||||||
|
echo -n "*** ERROR: PKGFS_TEMPLATESDIR cannot be read"
|
||||||
|
echo ", aborting ***"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
local PKGFS_VARS="PKGFS_MASTERDIR PKGFS_DESTDIR PKGFS_BUILDDIR \
|
local PKGFS_VARS="PKGFS_MASTERDIR PKGFS_DESTDIR PKGFS_BUILDDIR \
|
||||||
PKGFS_SRC_DISTDIR"
|
PKGFS_SRC_DISTDIR"
|
||||||
|
|
||||||
|
@ -603,7 +611,7 @@ install_dependency_tmpl()
|
||||||
check_installed_tmpl $i
|
check_installed_tmpl $i
|
||||||
[ "$?" -eq 0 ] && continue
|
[ "$?" -eq 0 ] && continue
|
||||||
echo ">>> Installing dependency: $i"
|
echo ">>> Installing dependency: $i"
|
||||||
install_tmpl "${PKGFS_TEMPLATESDIR}/${i%%-deps.db}.tmpl"
|
install_tmpl "${i%-deps.db}"
|
||||||
done
|
done
|
||||||
|
|
||||||
deps_list=
|
deps_list=
|
||||||
|
@ -678,7 +686,7 @@ check_installed_tmpl()
|
||||||
|
|
||||||
install_tmpl()
|
install_tmpl()
|
||||||
{
|
{
|
||||||
cur_tmpl="$1"
|
cur_tmpl="$PKGFS_TEMPLATESDIR/$1.tmpl"
|
||||||
if [ -z "$cur_tmpl" -o ! -f "$cur_tmpl" ]; then
|
if [ -z "$cur_tmpl" -o ! -f "$cur_tmpl" ]; then
|
||||||
echo -n "*** ERROR: invalid template file '$cur_tmpl',"
|
echo -n "*** ERROR: invalid template file '$cur_tmpl',"
|
||||||
echo " aborting ***"
|
echo " aborting ***"
|
||||||
|
|
Loading…
Reference in a new issue