add overlay and iso only switches

This commit is contained in:
udeved 2014-12-14 17:22:47 +01:00
parent 1dd67bdb7b
commit 7f226480fd

View file

@ -99,6 +99,7 @@ xorg_overlays=false
kde_lng_packages=false kde_lng_packages=false
auto_svc_conf=false auto_svc_conf=false
rebuild=false rebuild=false
iso_only=false
pacman_conf_arch='default' pacman_conf_arch='default'
@ -116,8 +117,8 @@ usage() {
echo ' -z High compression' echo ' -z High compression'
echo ' -x Xorg overlays' echo ' -x Xorg overlays'
echo ' -k kde lng packages' echo ' -k kde lng packages'
echo ' -A Let buildiso configure services(experimental)' echo ' -R Rebuild overlays only'
echo ' -R Rebuild iso xorg and lng overlay will use a defined cache' echo ' -G Generate iso only'
echo ' The custom cache will be cleaned if not set' echo ' The custom cache will be cleaned if not set'
echo ' -q Query settings and pretend build' echo ' -q Query settings and pretend build'
echo ' -h This help' echo ' -h This help'
@ -128,7 +129,7 @@ usage() {
orig_argv=("$@") orig_argv=("$@")
opts='a:b:r:t:i:cvfzqxkARh' opts='a:b:r:t:i:cvfzqxkARGh'
while getopts "${opts}" arg; do while getopts "${opts}" arg; do
case "${arg}" in case "${arg}" in
@ -145,6 +146,7 @@ while getopts "${opts}" arg; do
i) pacman_conf="$OPTARG" ;; i) pacman_conf="$OPTARG" ;;
A) auto_svc_conf=true ;; A) auto_svc_conf=true ;;
R) rebuild=true ;; R) rebuild=true ;;
G) iso_only=true ;;
q) pretend=true ;; q) pretend=true ;;
h) usage ;; h) usage ;;
esac esac
@ -204,6 +206,8 @@ if [[ ${rebuild} = "false" ]];then
[[ $(check_cache lng-image) ]] && clean_cache_lng [[ $(check_cache lng-image) ]] && clean_cache_lng
fi fi
make_overlays(){
# install basic # install basic
make_root_image make_root_image
@ -231,4 +235,17 @@ make_isolinux
make_overlay_image make_overlay_image
make_isomounts make_isomounts
}
if ${rebuild}; then
make_overlays
die "Run again with -G switch to make iso only."
else
make_overlays
fi
if ${iso_only}; then
make_iso make_iso
else
exit 1
fi