echo " --noloopmod No check and load kernel module automatically"
echo " --nodepend No check package dependencies before building"
echo " --noiso No build iso image (Use with --tarball)"
+ echo " --normwork No remove working dir"
echo " --shmkalteriso Use the shell script version of mkalteriso"
echo
echo " Many packages are installed from AUR, so specifying --noaur can cause problems."
[[ ! -d "${work_dir}" ]] && mkdir -p "${work_dir}"
# Check work dir
- if [[ -n $(ls -a "${work_dir}" 2> /dev/null | grep -xv ".." | grep -xv ".") ]]; then
+ if [[ -n $(ls -a "${work_dir}" 2> /dev/null | grep -xv ".." | grep -xv ".") ]] && [[ "${normwork}" = false ]]; then
umount_chroot_advance
msg_info "Deleting the contents of ${work_dir}..."
remove "${work_dir%/}"/*
local _trap_remove_work
_trap_remove_work() {
local status=${?}
- echo
- "${tools_dir}/clean.sh" -o -w $(realpath "${work_dir}") $([[ "${debug}" = true ]] && echo -n "-d")
+ if [[ "${normwork}" = false ]]; then
+ echo
+ "${tools_dir}/clean.sh" -o -w $(realpath "${work_dir}") $([[ "${debug}" = true ]] && echo -n "-d")
+ fi
exit ${status}
}
trap '_trap_remove_work' 1 2 3 15
# Parse options
ARGUMENT="${@}"
OPTS="a:bc:deg:hjk:l:o:p:rt:u:w:x"
-OPTL="arch:,boot-splash,comp-type:,debug,cleaning,cleanup,gpgkey:,help,lang:,japanese,kernel:,out:,password:,comp-opts:,user:,work:,bash-debug,nocolor,noconfirm,nodepend,gitversion,shmkalteriso,msgdebug,noloopmod,tarball,noiso,noaur,nochkver,channellist,config:,noefi,nodebug,nosigcheck"
+OPTL="arch:,boot-splash,comp-type:,debug,cleaning,cleanup,gpgkey:,help,lang:,japanese,kernel:,out:,password:,comp-opts:,user:,work:,bash-debug,nocolor,noconfirm,nodepend,gitversion,shmkalteriso,msgdebug,noloopmod,tarball,noiso,noaur,nochkver,channellist,config:,noefi,nodebug,nosigcheck,normwork"
if ! OPT=$(getopt -o ${OPTS} -l ${OPTL} -- ${DEFAULT_ARGUMENT} ${ARGUMENT}); then
exit 1
fi
nosigcheck=true
shift 1
;;
+ --normwork)
+ normwork=true
+ shift 1
+ ;;
--)
shift
break