summaryrefslogtreecommitdiff
path: root/mkarchroot
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2007-10-23 23:50:39 -0500
committerAaron Griffin <aaronmgriffin@gmail.com>2007-10-23 23:50:39 -0500
commita26b93d7798b664bec5330fba1b62ec0c07eec05 (patch)
tree27f233366dd7b01e6bd7dbd93b9bbf8d21c091fa /mkarchroot
parent0b7d43615be10f99f5a98fedc3bc323d0f4e76b8 (diff)
Added 'update' to mkarchroot
Allows automated updating of a chroot Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'mkarchroot')
-rwxr-xr-xmkarchroot8
1 files changed, 5 insertions, 3 deletions
diff --git a/mkarchroot b/mkarchroot
index 588fc73..338f9bb 100755
--- a/mkarchroot
+++ b/mkarchroot
@@ -22,17 +22,19 @@ fi
usage ()
{
- echo "usage ${APPNAME} [options] working-dir package [package [package..]]"
+ echo "usage ${APPNAME} [options] working-dir [package-list | app]"
echo " options:"
echo " -r <app> run 'app' within the context of the chroot"
+ echo " -u update the chroot via pacman"
echo " -f force overwrite of files in the working-dir"
echo " -h this message."
exit 1
}
-while getopts 'r:fh' arg; do
+while getopts 'r:ufh' arg; do
case "${arg}" in
r) RUN="$OPTARG" ;;
+ u) RUN="pacman -Syu" ;;
f) FORCE="y" ;;
h|?) usage ;;
*) echo "invalid argument '${arg}'"; usage ;;
@@ -134,7 +136,7 @@ else
op="${op}f"
fi
if ! pacman ${op} ${pacargs} $@; then
- echo "error: failed to instal all packages"
+ echo "error: failed to install all packages"
exit 1
fi
fi