X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=build.sh;h=0d4f84f279896b97336c088f8fbc515845567066;hb=60ab45fd47852e0f22e7883a596912d023a68135;hp=434f7005607f244259fc591b3fa26ffbb74ed93d;hpb=66a32499baf1236daca31e1f75dcbe15a2a6d3ff;p=alterlinux%2Falterlinux.git diff --git a/build.sh b/build.sh index 434f7005..0d4f84f2 100755 --- a/build.sh +++ b/build.sh @@ -17,19 +17,12 @@ set -Eeu # Do not change these values. script_path="$( cd -P "$( dirname "$(readlink -f "${0}")" )" && pwd )" defaultconfig="${script_path}/default.conf" -tools_dir="${script_path}/tools" -module_dir="${script_path}/modules" -customized_username=false -customized_password=false -customized_kernel=false -customized_logpath=false -pkglist_args=() -makepkg_script_args=() -modules=() -DEFAULT_ARGUMENT="" -ARGUMENT=("${@}") +tools_dir="${script_path}/tools" module_dir="${script_path}/modules" +customized_username=false customized_password=false customized_kernel=false customized_logpath=false +pkglist_args=() makepkg_script_args=() modules=() norepopkg=() +legacy_mode=false rerun=false +DEFAULT_ARGUMENT="" ARGUMENT=("${@}") alteriso_version="3.1" -norepopkg=() # Load config file [[ ! -f "${defaultconfig}" ]] && "${tools_dir}/msg.sh" -a 'build.sh' error "${defaultconfig} was not found." && exit 1 @@ -42,8 +35,7 @@ umask 0022 # Message common function # msg_common [type] [-n] [string] msg_common(){ - local _msg_opts=("-a" "build.sh") _type="${1}" - shift 1 + local _msg_opts=("-a" "build.sh") _type="${1}" && shift 1 [[ "${1}" = "-n" ]] && _msg_opts+=("-o" "-n") && shift 1 [[ "${msgdebug}" = true ]] && _msg_opts+=("-x") [[ "${nocolor}" = true ]] && _msg_opts+=("-n") @@ -82,29 +74,11 @@ getclm() { cut -d " " -f "${1}"; } # 指定されたぶんの半角空白文字を出力します echo_blank(){ yes " " 2> /dev/null | head -n "${1}" | tr -d "\n"; } -_usage () { - echo "usage ${0} [options] [channel]" - echo - echo "A channel is a profile of AlterISO settings." - echo - echo " General options:" - echo " -b | --boot-splash Enable boot splash" - echo " -e | --cleanup | --cleaning Enable post-build cleaning" - echo " -r | --tarball Build rootfs in tar.xz format" - echo " -h | --help This help message and exit" - echo - echo " -a | --arch Set iso architecture" - echo " -c | --comp-type Set SquashFS compression type (gzip, lzma, lzo, xz, zstd)" - echo " -g | --gpgkey Set gpg key" - echo " -l | --lang Specifies the default language for the live environment" - echo " -k | --kernel Set special kernel type. See below for available kernels" - echo " -o | --out Set the output directory" - echo " -p | --password Set a live user password" - echo " -t | --comp-opts Set compressor-specific options." - echo " -u | --user Set user name" - echo " -w | --work Set the working directory" - echo +# cpコマンドのラッパー +_cp(){ cp -af --no-preserve=ownership,mode -- "${@}"; } +_usage () { + cat "${script_path}/docs/build.sh/help.1" local blank="29" _arch _dirname _type _output _first for _type in "locale" "kernel"; do echo " ${_type} for each architecture:" @@ -124,36 +98,7 @@ _usage () { _first=false done done - - echo - echo " Debug options: Please use at your own risk." - echo " -d | --debug Enable debug messages" - echo " -x | --bash-debug Enable bash debug mode(set -xv)" - echo " --channellist Output the channel list and exit" - echo " --config Load additional config file" - echo " --[no]gitversion Add Git commit hash to image file version" - echo " --logpath Set log file path (use with --log)" - echo " --[no]log (No) log ;re-run script with tee" - echo " --msgdebug Enables output debugging" - echo " --noaur Ignore aur packages (Use only for debugging)" - echo " --nocolor No output colored output" - echo " --[no]confirm (No) check the settings before building" - echo " --nochkver No check the version of the channel" - echo " --nodebug Disable all debug messages" - echo " --noefi No efi boot (Use only for debugging)" - 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 " --nosigcheck No pacman signature check" - echo " --pacman-debug Enable pacman debug mode" - echo " --normwork No remove working dir" - echo " --nopkgbuild Ignore PKGBUILD (Use only for debugging)" - echo " --tar-type Set compression type (gzip, lzma, lzo, xz, zstd)" - echo " --tar-opts