Remove all 'package file' usage in favor of command line packages
This is just simpler and more intuitive. Shell tools can easily be used to install from a file. For instance: $ mkarciso ... -p "$(cat package-file)" Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
This commit is contained in:
parent
c2ffda39f9
commit
00848934b6
1 changed files with 2 additions and 20 deletions
|
@ -15,7 +15,7 @@ usage ()
|
||||||
echo " general options:"
|
echo " general options:"
|
||||||
echo " -f Force overwrite of working files/squashfs image/bootable image"
|
echo " -f Force overwrite of working files/squashfs image/bootable image"
|
||||||
echo " -i CPIO_CONFIG Use CONFIG file for mkinitcpio. default: ${CPIOCONFIG}"
|
echo " -i CPIO_CONFIG Use CONFIG file for mkinitcpio. default: ${CPIOCONFIG}"
|
||||||
echo " -p PACKAGE Additional package to install, can be used multiple times"
|
echo " -p PACKAGE(S) Additional package(s) to install, can be used multiple times"
|
||||||
echo " -t <iso,disk> Type of image to create. Defaults to iso."
|
echo " -t <iso,disk> Type of image to create. Defaults to iso."
|
||||||
echo " -v Enable verbose output."
|
echo " -v Enable verbose output."
|
||||||
echo " -h This message."
|
echo " -h This message."
|
||||||
|
@ -51,11 +51,10 @@ fi
|
||||||
|
|
||||||
command_name="${1}"
|
command_name="${1}"
|
||||||
work_dir=""
|
work_dir=""
|
||||||
pkgfile=""
|
|
||||||
imgname=""
|
imgname=""
|
||||||
|
|
||||||
case "${command_name}" in
|
case "${command_name}" in
|
||||||
install) work_dir="${2}"; pkgfile="${3}"; imgname="none" ;;
|
install) work_dir="${2}"; imgname="none" ;;
|
||||||
squash) work_dir="${2}"; imgname="${3}" ;;
|
squash) work_dir="${2}"; imgname="${3}" ;;
|
||||||
img) work_dir="${2}"; imgname="${3}" ;;
|
img) work_dir="${2}"; imgname="${3}" ;;
|
||||||
*) echo "invalid command name '${command_name}'"; usage 1 ;;
|
*) echo "invalid command name '${command_name}'"; usage 1 ;;
|
||||||
|
@ -91,21 +90,6 @@ _pacman ()
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# usage: install_pkgfile <packagesfile>
|
|
||||||
install_pkgfile ()
|
|
||||||
{
|
|
||||||
if [ -e "${1}" ]; then
|
|
||||||
toinstall=""
|
|
||||||
while read pkg; do
|
|
||||||
toinstall="${toinstall} ${pkg}"
|
|
||||||
done < ${1}
|
|
||||||
_pacman "${toinstall}"
|
|
||||||
else
|
|
||||||
echo "error: Package file '${1}' does not exist, aborting."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
command_install () {
|
command_install () {
|
||||||
echo "====> Installing packages to '${work_dir}'"
|
echo "====> Installing packages to '${work_dir}'"
|
||||||
if [ -e "${work_dir}" -a "${FORCE}" = "n" ]; then
|
if [ -e "${work_dir}" -a "${FORCE}" = "n" ]; then
|
||||||
|
@ -116,8 +100,6 @@ command_install () {
|
||||||
mkdir -p "${work_dir}"
|
mkdir -p "${work_dir}"
|
||||||
|
|
||||||
echo "Installing packages..."
|
echo "Installing packages..."
|
||||||
echo " Installing packages from '${pkgfile}'"
|
|
||||||
install_pkgfile "${pkgfile}"
|
|
||||||
|
|
||||||
for pkg in ${PKGLIST}; do
|
for pkg in ${PKGLIST}; do
|
||||||
echo " Installing package '${pkg}'"
|
echo " Installing package '${pkg}'"
|
||||||
|
|
Loading…
Add table
Reference in a new issue