Skip to content

Commit 7250c77

Browse files
committed
[update] : Added --depend
1 parent 3f73d3b commit 7250c77

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ umask 0022
4444
# Message common function
4545
# msg_common [type] [-n] [string]
4646
msg_common(){
47-
local _msg_opts=("-a" "build.sh") _type="${1}"
48-
shift 1
47+
local _msg_opts=("-a" "build.sh") _type="${1}" && shift 1
4948
[[ "${1}" = "-n" ]] && _msg_opts+=("-o" "-n") && shift 1
5049
[[ "${msgdebug}" = true ]] && _msg_opts+=("-x")
5150
[[ "${nocolor}" = true ]] && _msg_opts+=("-n")
@@ -144,7 +143,7 @@ _usage () {
144143
echo " --nodebug Disable all debug messages"
145144
echo " --noefi No efi boot (Use only for debugging)"
146145
echo " --noloopmod No check and load kernel module automatically"
147-
echo " --nodepend No check package dependencies before building"
146+
echo " --[no]depend (No) check package dependencies before building"
148147
echo " --noiso No build iso image (Use with --tarball)"
149148
echo " --nosigcheck No pacman signature check"
150149
echo " --pacman-debug Enable pacman debug mode"
@@ -1054,7 +1053,7 @@ make_iso() {
10541053

10551054

10561055
# Parse options
1057-
ARGUMENT=("${DEFAULT_ARGUMENT[@]}" "${@}") OPTS=("a:" "b" "c:" "d" "e" "g:" "h" "j" "k:" "l:" "o:" "p:" "r" "t:" "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" "msgdebug" "noloopmod" "tarball" "noiso" "noaur" "nochkver" "channellist" "config:" "noefi" "nodebug" "nosigcheck" "normwork" "log" "logpath:" "nolog" "nopkgbuild" "pacman-debug" "confirm" "tar-type:" "tar-opts:" "add-module:" "nogitversion" "cowspace:" "rerun")
1056+
ARGUMENT=("${DEFAULT_ARGUMENT[@]}" "${@}") OPTS=("a:" "b" "c:" "d" "e" "g:" "h" "j" "k:" "l:" "o:" "p:" "r" "t:" "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" "msgdebug" "noloopmod" "tarball" "noiso" "noaur" "nochkver" "channellist" "config:" "noefi" "nodebug" "nosigcheck" "normwork" "log" "logpath:" "nolog" "nopkgbuild" "pacman-debug" "confirm" "tar-type:" "tar-opts:" "add-module:" "nogitversion" "cowspace:" "rerun" "depend")
10581057
GETOPT=(-o "$(printf "%s," "${OPTS[@]}")" -l "$(printf "%s," "${OPTL[@]}")" -- "${ARGUMENT[@]}")
10591058
getopt -Q "${GETOPT[@]}" || exit 1 # 引数エラー判定
10601059
readarray -t OPT < <(getopt "${GETOPT[@]}") # 配列に代入
@@ -1158,6 +1157,7 @@ while true; do
11581157
--nogitversion ) gitversion=false && shift 1 ;;
11591158
--cowspace ) cowspace="${2}" && shift 2 ;;
11601159
--rerun ) rerun=true && shift 1 ;;
1160+
--depend ) nodepend=false && shift 1 ;;
11611161
-- ) shift 1 && break ;;
11621162
*)
11631163
msg_error "Argument exception error '${1}'"

0 commit comments

Comments
 (0)