Commit f73e6e25 authored by Bernhard Landauer's avatar Bernhard Landauer
Browse files

[prepare_crhoot] add custom_repo

parent 06ec0516
# Author: Bernhard Landauer <bernhard@manjaro.org>
pkgname=manjaro-chrootbuild
pkgver=r190.gd598e78
pkgver=r194.g06ec051
pkgrel=1
pkgdesc="Build packages and buildlists in a chroot filesystem."
arch=('any')
......
......@@ -23,8 +23,8 @@ while getopts "b:cdghi:k:l:np:rsux" arg; do
s) SIGN=true ;;
u) UPDATE=true ;;
x) RM_PKGS=true ;;
h|?) usage 0 ;;
*) usage 1 ;;
h|?) usage_chrootbuild 0 ;;
*) usage_chrootbuild 1 ;;
esac
done
shift $((OPTIND -1))
......
......@@ -5,25 +5,9 @@ LIBDIR='/usr/lib/manjaro-chrootbuild'
. ${LIBDIR}/util.sh
. ${LIBDIR}/util-chroot.sh
KEEP=false
MOUNT=false
UMOUNT=false
usage_prepare_chroot() {
echo ''
echo "Usage: ${0##*/} [options]"
echo ''
echo ' -b <branch> Branch to use:'
echo ' (unstable/testing/stable-staging/stable;'
echo ' arm-unstable/arm-testing/arm-stable)'
echo ' default: unstable / arm-unstable'
echo ' -c Create clean chroot filesystem'
echo ' -h This help'
echo ' -k Keep Chroot filesystem mounted'
echo ' -u Unmount Chroot filesystem cleanly'
echo ''
exit $1
}
trap 'abort "Aborted."' INT
check_root
get_default_branch
......@@ -32,7 +16,8 @@ while getopts "b:chku" arg; do
case "${arg}" in
b) BRANCH="${OPTARG}" ;;
c) CLEAN=true ;;
k) KEEP=true ;;
k) custom_repo="${OPTARG}" ;;
m) MOUNT=true ;;
u) UMOUNT=true ;;
h|?) usage_prepare_chroot 0 ;;
*) usage_prepare_chroot 1 ;;
......@@ -48,7 +33,7 @@ fi
prepare_chroot ${CHROOT_DIR}
if [ $KEEP = true ]; then
if [ $MOUNT = true ]; then
msg "Chroot filesystem of branch [${BRANCH}] is ready and mounted at [${CHROOT_DIR}]."
msg4 "To unmount run 'prepare_chroot' again with the '-u' flag."
else
......
......@@ -198,7 +198,7 @@ ssh_add(){
fi
}
usage() {
usage_chrootbuild() {
echo ''
echo "Usage: ${0##*/} [options]"
echo ''
......@@ -227,3 +227,21 @@ usage() {
echo ''
exit $1
}
usage_prepare_chroot() {
echo ''
echo "Usage: ${0##*/} [options]"
echo ''
echo ' -b <branch> Branch to use:'
echo ' (unstable/testing/stable-staging/stable;'
echo ' arm-unstable/arm-testing/arm-stable)'
echo ' default: unstable / arm-unstable'
echo ' -c Create clean chroot filesystem'
echo ' -h This help'
echo ' -k <repo> Use custom repo:'
echo ' (mobile/kde-unstable)'
echo ' -m Keep Chroot filesystem mounted'
echo ' -u Unmount Chroot filesystem cleanly'
echo ''
exit $1
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment