Skip to content

Commit

Permalink
Merge pull request #93 from ggtakec/update/support_os
Browse files Browse the repository at this point in the history
Changed support OSes and Fixed scripts, etc
  • Loading branch information
ggtakec authored Feb 7, 2025
2 parents 31cbe39 + 5e58949 commit 86876dd
Show file tree
Hide file tree
Showing 19 changed files with 140 additions and 117 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ if [ "${RUN_SHELLCHECK}" -eq 1 ]; then
# Fedora
#
if ({ RUNCMD "${INSTALLER_BIN}" "${INSTALL_CMD}" "${INSTALL_CMD_ARG}" "${INSTALL_AUTO_ARG}" ShellCheck || echo > "${PIPEFAILURE_FILE}"; } | sed -e 's/^/ /g') && rm "${PIPEFAILURE_FILE}" >/dev/null 2>&1; then
PRNERR "Failed to install cppcheck"
PRNERR "Failed to install shellcheck"
exit 1
fi

Expand All @@ -1377,7 +1377,7 @@ if [ "${RUN_SHELLCHECK}" -eq 1 ]; then
# Ubuntu or Debian
#
if ({ RUNCMD "${INSTALLER_BIN}" "${INSTALL_CMD}" "${INSTALL_CMD_ARG}" "${INSTALL_AUTO_ARG}" shellcheck || echo > "${PIPEFAILURE_FILE}"; } | sed -e 's/^/ /g') && rm "${PIPEFAILURE_FILE}" >/dev/null 2>&1; then
PRNERR "Failed to install cppcheck"
PRNERR "Failed to install shellcheck"
exit 1
fi

Expand All @@ -1386,7 +1386,7 @@ if [ "${RUN_SHELLCHECK}" -eq 1 ]; then
# Alpine
#
if ({ RUNCMD "${INSTALLER_BIN}" "${INSTALL_CMD}" "${INSTALL_CMD_ARG}" "${INSTALL_AUTO_ARG}" shellcheck || echo > "${PIPEFAILURE_FILE}"; } | sed -e 's/^/ /g') && rm "${PIPEFAILURE_FILE}" >/dev/null 2>&1; then
PRNERR "Failed to install cppcheck"
PRNERR "Failed to install shellcheck"
exit 1
fi

Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,15 @@ jobs:
container:
- ubuntu:24.04
- ubuntu:22.04
- ubuntu:20.04
- debian:bookworm
- debian:bullseye
- rockylinux:9
- rockylinux:8
- fedora:41
- fedora:40
- alpine:3.21
- alpine:3.20
- alpine:3.19
- alpine:3.18

container:
image: ${{ matrix.container }}
Expand Down Expand Up @@ -150,7 +149,7 @@ jobs:
# <default tag flag>: If you want to use the created Docker image as the default image, specify "default".
#
imageinfo:
- alpine:3.20,alpine:3.20,alpine,default
- alpine:3.21,alpine:3.21,alpine,default
- ubuntu:24.04,ubuntu:24.04,ubuntu

#
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/docker_helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func_usage()
echo " Option:"
echo " --help(-h) print help"
echo " --imagetype-vars-file(-f) <file path> specify the file path to imagetype variable(deafult. \"imagetypevars.sh\")"
echo " --imageinfo(-i) <image info> specify infomration about "base docker image", "base docker dev image", "os type tag" and "default flag" (ex. \"alpine:latest,alpine:latest,alpine,default\")"
echo " --imageinfo(-i) <image info> specify infomration about \"base docker image\", \"base docker dev image\", \"os type tag\" and \"default flag\" (ex. \"alpine:latest,alpine:latest,alpine,default\")"
echo " --organization(-o) <organization> specify organaization name on DockerHub(default. \"antpickax\")"
echo " --imagenames(-n) <image name> specify build image names, separate multiple names with commas(ex. \"target,target-dev\")"
echo " --imageversion(-v) <version> the value of this option is set automatically and is usually not specified.(ex. \"1.0.0\")"
Expand Down Expand Up @@ -363,11 +363,11 @@ while [ $# -ne 0 ]; do
if [ -z "$1" ]; then
break

elif [ "$1" = "-h" ] || [ "$1" = "-H" ] || [ "$1" = "--help" ] || [ "$1" = "--HELP" ]; then
elif echo "$1" | grep -q -i -e "^-h$" -e "^--help$"; then
func_usage "${PRGNAME}"
exit 0

elif [ "$1" = "-f" ] || [ "$1" = "-F" ] || [ "$1" = "--imagetype-vars-file" ] || [ "$1" = "--IMAGETYPE-VARS-FILE" ]; then
elif echo "$1" | grep -q -i -e "^-f$" -e "^--imagetype-vars-file$"; then
if [ -n "${OPT_IMAGEVAR_FILE}" ]; then
PRNERR "already set \"--imagetype-vars-file(-f)\" option."
exit 1
Expand All @@ -387,7 +387,7 @@ while [ $# -ne 0 ]; do
OPT_IMAGEVAR_FILE="$1"
fi

elif [ "$1" = "-i" ] || [ "$1" = "-I" ] || [ "$1" = "--imageinfo" ] || [ "$1" = "--IMAGEINFO" ]; then
elif echo "$1" | grep -q -i -e "^-i$" -e "^--imageinfo$"; then
if [ -n "${OPT_DOCKER_IMAGE_INFO}" ]; then
PRNERR "already set \"--imageinfo(-i)\" option."
exit 1
Expand All @@ -399,7 +399,7 @@ while [ $# -ne 0 ]; do
fi
OPT_DOCKER_IMAGE_INFO="$1"

elif [ "$1" = "-o" ] || [ "$1" = "-O" ] || [ "$1" = "--organization" ] || [ "$1" = "--ORGANIZATION" ]; then
elif echo "$1" | grep -q -i -e "^-o$" -e "^--organization$"; then
if [ -n "${OPT_DOCKER_HUB_ORG}" ]; then
PRNERR "already set \"--organization(-o)\" option."
exit 1
Expand All @@ -411,7 +411,7 @@ while [ $# -ne 0 ]; do
fi
OPT_DOCKER_HUB_ORG="$1"

elif [ "$1" = "-n" ] || [ "$1" = "-N" ] || [ "$1" = "--imagenames" ] || [ "$1" = "--IMAGENAMES" ]; then
elif echo "$1" | grep -q -i -e "^-n$" -e "^--imagenames$"; then
if [ -n "${OPT_IMAGE_NAMES}" ]; then
PRNERR "already set \"--imagenames(-n)\" option."
exit 1
Expand All @@ -423,7 +423,7 @@ while [ $# -ne 0 ]; do
fi
OPT_IMAGE_NAMES="$1"

elif [ "$1" = "-v" ] || [ "$1" = "-V" ] || [ "$1" = "--imageversion" ] || [ "$1" = "--IMAGEVERSION" ]; then
elif echo "$1" | grep -q -i -e "^-v$" -e "^--imageversion$"; then
if [ -n "${OPT_IMAGE_VERSION}" ]; then
PRNERR "already set \"--imageversion(-v)\" option."
exit 1
Expand All @@ -435,35 +435,35 @@ while [ $# -ne 0 ]; do
fi
OPT_IMAGE_VERSION="$1"

elif [ "$1" = "-p" ] || [ "$1" = "-P" ] || [ "$1" = "--push" ] || [ "$1" = "--PUSH" ]; then
elif echo "$1" | grep -q -i -e "^-p$" -e "^--push$"; then
if [ -n "${OPT_FORCE_PUSH}" ]; then
PRNERR "already set \"--push(-p)\" or \"--notpush(-np)\" option."
exit 1
fi
OPT_FORCE_PUSH="true"

elif [ "$1" = "-np" ] || [ "$1" = "-NP" ] || [ "$1" = "--notpush" ] || [ "$1" = "--NOTPUSH" ]; then
elif echo "$1" | grep -q -i -e "^-np$" -e "^--notpush$"; then
if [ -n "${OPT_FORCE_PUSH}" ]; then
PRNERR "already set \"--push(-p)\" or \"--notpush(-np)\" option."
exit 1
fi
OPT_FORCE_PUSH="false"

elif [ "$1" = "-usepc" ] || [ "$1" = "-USEPC" ] || [ "$1" = "--use-packagecloudio-repo" ] || [ "$1" = "--USE-PACKAGECLOUDIO-REPO" ]; then
elif echo "$1" | grep -q -i -e "^-usepc$" -e "^--use-packagecloudio-repo$"; then
if [ -n "${OPT_USE_PACKAGECLOUD_REPO}" ]; then
PRNERR "already set \"--use-packagecloudio-repo(-usepc)\" or \"--not-use-packagecloudio-repo(-notpc)\" option."
exit 1
fi
OPT_USE_PACKAGECLOUD_REPO=1

elif [ "$1" = "-notpc" ] || [ "$1" = "-NOTPC" ] || [ "$1" = "--not-use-packagecloudio-repo" ] || [ "$1" = "--NOT-USE-PACKAGECLOUDIO-REPO" ]; then
elif echo "$1" | grep -q -i -e "^-notpc$" -e "^--not-use-packagecloudio-repo$"; then
if [ -n "${OPT_USE_PACKAGECLOUD_REPO}" ]; then
PRNERR "already set \"--use-packagecloudio-repo(-usepc)\" or \"--not-use-packagecloudio-repo(-notpc)\" option."
exit 1
fi
OPT_USE_PACKAGECLOUD_REPO=0

elif [ "$1" = "-pcowner" ] || [ "$1" = "-PCOWNER" ] || [ "$1" = "--packagecloudio-owner" ] || [ "$1" = "--PACKAGECLOUDIO-OWNER" ]; then
elif echo "$1" | grep -q -i -e "^-pcowner$" -e "^--packagecloudio-owner$"; then
if [ -n "${OPT_PACKAGECLOUD_OWNER}" ]; then
PRNERR "already set \"--packagecloudio-owner(-pcowner)\" option."
exit 1
Expand All @@ -475,7 +475,7 @@ while [ $# -ne 0 ]; do
fi
OPT_PACKAGECLOUD_OWNER="$1"

elif [ "$1" = "-pcdlrepo" ] || [ "$1" = "-PCDLREPO" ] || [ "$1" = "--packagecloudio-download-repo" ] || [ "$1" = "--PACKAGECLOUDIO-DOWNLOAD-REPO" ]; then
elif echo "$1" | grep -q -i -e "^-pcdlrepo$" -e "^--packagecloudio-download-repo$"; then
if [ -n "${OPT_PACKAGECLOUD_DOWNLOAD_REPO}" ]; then
PRNERR "already set \"--packagecloudio-download-repo(-pcdlrepo)\" option."
exit 1
Expand Down
26 changes: 6 additions & 20 deletions .github/workflows/ostypevars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,20 +122,6 @@ elif echo "${CI_OSTYPE}" | grep -q -i -e "ubuntu:22.04" -e "ubuntu:jammy"; then
PKG_EXT="deb"
IS_OS_UBUNTU=1

elif echo "${CI_OSTYPE}" | grep -q -i -e "ubuntu:20.04" -e "ubuntu:focal"; then
DIST_TAG="ubuntu/focal"
INSTALL_PKG_LIST="git autoconf autotools-dev gcc g++ make gdb dh-make fakeroot dpkg-dev devscripts libtool pkg-config ruby-dev rubygems rubygems-integration procps libyaml-dev chmpx-dev gnutls-dev dh-systemd"
INSTALLER_BIN="apt-get"
UPDATE_CMD="update"
UPDATE_CMD_ARG=""
INSTALL_CMD="install"
INSTALL_CMD_ARG=""
INSTALL_AUTO_ARG="-y"
INSTALL_QUIET_ARG="-qq"
PKG_OUTPUT_DIR="debian_build"
PKG_EXT="deb"
IS_OS_UBUNTU=1

elif echo "${CI_OSTYPE}" | grep -q -i -e "debian:12" -e "debian:bookworm"; then
DIST_TAG="debian/bookworm"
INSTALL_PKG_LIST="git autoconf autotools-dev gcc g++ make gdb dh-make fakeroot dpkg-dev devscripts libtool pkg-config ruby-dev rubygems rubygems-integration procps libyaml-dev chmpx-dev libssl-dev"
Expand Down Expand Up @@ -242,8 +228,8 @@ elif echo "${CI_OSTYPE}" | grep -q -i "fedora:40"; then
PKG_EXT="rpm"
IS_OS_FEDORA=1

elif echo "${CI_OSTYPE}" | grep -q -i "alpine:3.20"; then
DIST_TAG="alpine/v3.20"
elif echo "${CI_OSTYPE}" | grep -q -i "alpine:3.21"; then
DIST_TAG="alpine/v3.21"
INSTALL_PKG_LIST="bash sudo alpine-sdk automake autoconf libtool groff util-linux-misc musl-locales ruby-dev procps yaml-dev chmpx-dev openssl-dev"
INSTALLER_BIN="apk"
UPDATE_CMD="update"
Expand All @@ -256,8 +242,8 @@ elif echo "${CI_OSTYPE}" | grep -q -i "alpine:3.20"; then
PKG_EXT="apk"
IS_OS_ALPINE=1

elif echo "${CI_OSTYPE}" | grep -q -i "alpine:3.19"; then
DIST_TAG="alpine/v3.19"
elif echo "${CI_OSTYPE}" | grep -q -i "alpine:3.20"; then
DIST_TAG="alpine/v3.20"
INSTALL_PKG_LIST="bash sudo alpine-sdk automake autoconf libtool groff util-linux-misc musl-locales ruby-dev procps yaml-dev chmpx-dev openssl-dev"
INSTALLER_BIN="apk"
UPDATE_CMD="update"
Expand All @@ -270,8 +256,8 @@ elif echo "${CI_OSTYPE}" | grep -q -i "alpine:3.19"; then
PKG_EXT="apk"
IS_OS_ALPINE=1

elif echo "${CI_OSTYPE}" | grep -q -i "alpine:3.18"; then
DIST_TAG="alpine/v3.18"
elif echo "${CI_OSTYPE}" | grep -q -i "alpine:3.19"; then
DIST_TAG="alpine/v3.19"
INSTALL_PKG_LIST="bash sudo alpine-sdk automake autoconf libtool groff util-linux-misc musl-locales ruby-dev procps yaml-dev chmpx-dev openssl-dev"
INSTALLER_BIN="apk"
UPDATE_CMD="update"
Expand Down
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

Wrote from scratch the initial version of k2hdkc.

2. Hirotaka Wakabayashi <hiwakaba@yahoo-corp.jp>
2. Hirotaka Wakabayashi <hiwakaba@lycorp.co.jp>

Technical engineer of k2hdkc product.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ K2HDKC
[![GitHub forks](https://img.shields.io/github/forks/yahoojapan/k2hdkc.svg)](https://github.com/yahoojapan/k2hdkc/network)
[![GitHub stars](https://img.shields.io/github/stars/yahoojapan/k2hdkc.svg)](https://github.com/yahoojapan/k2hdkc/stargazers)
[![GitHub issues](https://img.shields.io/github/issues/yahoojapan/k2hdkc.svg)](https://github.com/yahoojapan/k2hdkc/issues)
[![debian packages](https://img.shields.io/badge/deb-packagecloud.io-844fec.svg)](https://packagecloud.io/antpickax/stable)
[![RPM packages](https://img.shields.io/badge/rpm-packagecloud.io-844fec.svg)](https://packagecloud.io/antpickax/stable)
[![debian packages](https://img.shields.io/badge/deb-packagecloud.io-844fec.svg)](https://packagecloud.io/antpickax/stable)
[![ALPINE packages](https://img.shields.io/badge/apk-packagecloud.io-844fec.svg)](https://packagecloud.io/antpickax/stable)
[![Docker image](https://img.shields.io/docker/pulls/antpickax/k2hdkc.svg)](https://hub.docker.com/r/antpickax/k2hdkc)
[![Docker dev image](https://img.shields.io/docker/pulls/antpickax/k2hdkc-dev.svg)](https://hub.docker.com/r/antpickax/k2hdkc-dev)

Expand Down Expand Up @@ -42,6 +43,7 @@ Provides the key expiration function which is the feature of k2hash as distribut
### Packages
- [RPM packages(packagecloud.io)](https://packagecloud.io/antpickax/stable)
- [Debian packages(packagecloud.io)](https://packagecloud.io/antpickax/stable)
- [ALPINE packages(packagecloud.io)](https://packagecloud.io/antpickax/stable)

### Docker images
- [k2hdkc(Docker Hub)](https://hub.docker.com/r/antpickax/k2hdkc)
Expand Down
8 changes: 4 additions & 4 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,18 @@ while [ $# -ne 0 ]; do
echo "[ERROR] Parameters are something wrong."
exit 1

elif [ "$1" = "-h" ] || [ "$1" = "-H" ] || [ "$1" = "--help" ] || [ "$1" = "--HELP" ]; then
elif echo "$1" | grep -q -i -e "^-h$" -e "^--help$"; then
echo "Usage: ${AUTOGEN_NAME} [--help(-h)] [--no_update_version_file(-nu)] [--no_aclocal_force(-na)] [--no_check_ver_diff(-nc)]"
exit 0

elif [ "$1" = "-nu" ] || [ "$1" = "-NU" ] || [ "$1" = "--no_update_version_file" ] || [ "$1" = "--NO_UPDATE_VERSION_FILE" ]; then
elif echo "$1" | grep -q -i -e "^-nu$" -e "^--no_update_version_file$"; then
UPDATE_VERSION_FILE=0
FORCEPARAM="" # do not need force

elif [ "$1" = "-na" ] || [ "$1" = "-NA" ] || [ "$1" = "--no_aclocal_force" ] || [ "$1" = "--NO_ACLOCAL_FORCE" ]; then
elif echo "$1" | grep -q -i -e "^-na$" -e "^--no_aclocal_force$"; then
FORCEPARAM=""

elif [ "$1" = "-nc" ] || [ "$1" = "-NC" ] || [ "$1" = "--no_check_ver_diff" ] || [ "$1" = "--NO_CHECK_VER_DIFF" ]; then
elif echo "$1" | grep -q -i -e "^-nc$" -e "^--no_check_ver_diff$"; then
PARAMETERS="$1"

else
Expand Down
8 changes: 4 additions & 4 deletions buildutils/alpine_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ while [ $# -ne 0 ]; do
if [ -z "$1" ]; then
break

elif [ "$1" = "-h" ] || [ "$1" = "-H" ] || [ "$1" = "--help" ] || [ "$1" = "--HELP" ]; then
elif echo "$1" | grep -q -i -e "^-h$" -e "^--help$"; then
func_usage "${PRGNAME}"
exit 0

elif [ "$1" = "-b" ] || [ "$1" = "-B" ] || [ "$1" = "--buildnum" ] || [ "$1" = "--BUILDNUM" ]; then
elif echo "$1" | grep -q -i -e "^-b$" -e "^--buildnum$"; then
if [ -n "${BUILD_NUMBER}" ]; then
echo "[ERROR] Already --buildnum(-b) option is specified(${BUILD_NUMBER})." 1>&2
exit 1
Expand All @@ -119,7 +119,7 @@ while [ $# -ne 0 ]; do
fi
BUILD_NUMBER="$1"

elif [ "$1" = "-p" ] || [ "$1" = "-P" ] || [ "$1" = "--product" ] || [ "$1" = "--PRODUCT" ]; then
elif echo "$1" | grep -q -i -e "^-p$" -e "^--product$"; then
if [ -n "${PACKAGE_NAME}" ]; then
echo "[ERROR] Already --product(-p) option is specified(${PACKAGE_NAME})." 1>&2
exit 1
Expand All @@ -131,7 +131,7 @@ while [ $# -ne 0 ]; do
fi
PACKAGE_NAME="$1"

elif [ "$1" = "-y" ] || [ "$1" = "-Y" ] || [ "$1" = "--yes" ] || [ "$1" = "--YES" ]; then
elif echo "$1" | grep -q -i -e "^-y$" -e "^--yes$"; then
if [ "${NO_INTERACTIVE}" -ne 0 ]; then
echo "[ERROR] Already --yes(-y) option is specified." 1>&2
exit 1
Expand Down
18 changes: 9 additions & 9 deletions buildutils/debian_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ while [ $# -ne 0 ]; do
if [ -z "$1" ]; then
break

elif [ "$1" = "-h" ] || [ "$1" = "-H" ] || [ "$1" = "--help" ] || [ "$1" = "--HELP" ]; then
elif echo "$1" | grep -q -i -e "^-h$" -e "^--help$"; then
func_usage "${PRGNAME}"
exit 0

elif [ "$1" = "-b" ] || [ "$1" = "-B" ] || [ "$1" = "--buildnum" ] || [ "$1" = "--BUILDNUM" ]; then
elif echo "$1" | grep -q -i -e "^-b$" -e "^--buildnum$"; then
if [ "${BUILD_NUMBER}" -ne 0 ]; then
echo "[ERROR] Already --buildnum(-b) option is specified(${BUILD_NUMBER})." 1>&2
exit 1
Expand All @@ -128,7 +128,7 @@ while [ $# -ne 0 ]; do
fi
BUILD_NUMBER="$1"

elif [ "$1" = "-p" ] || [ "$1" = "-P" ] || [ "$1" = "--product" ] || [ "$1" = "--PRODUCT" ]; then
elif echo "$1" | grep -q -i -e "^-p$" -e "^--product$"; then
if [ -n "${PACKAGE_NAME}" ]; then
echo "[ERROR] Already --product(-p) option is specified(${PACKAGE_NAME})." 1>&2
exit 1
Expand All @@ -140,7 +140,7 @@ while [ $# -ne 0 ]; do
fi
PACKAGE_NAME="$1"

elif [ "$1" = "-c" ] || [ "$1" = "-C" ] || [ "$1" = "--class" ] || [ "$1" = "--CLASS" ]; then
elif echo "$1" | grep -q -i -e "^-c$" -e "^--class$"; then
if [ -n "${PKG_CLASS_NAME}" ]; then
echo "[ERROR] Already --class(-c) option is specified(${PKG_CLASS_NAME})." 1>&2
exit 1
Expand All @@ -152,7 +152,7 @@ while [ $# -ne 0 ]; do
fi
PKG_CLASS_NAME="$1"

elif [ "$1" = "-dt" ] || [ "$1" = "-DT" ] || [ "$1" = "--disttype" ] || [ "$1" = "--DISTTYPE" ]; then
elif echo "$1" | grep -q -i -e "^-dt$" -e "^--disttype$"; then
if [ -n "${OS_VERSION_NAME}" ]; then
echo "[ERROR] Already --disttype(-dt) option is specified(${OS_VERSION_NAME})." 1>&2
exit 1
Expand All @@ -164,14 +164,14 @@ while [ $# -ne 0 ]; do
fi
OS_VERSION_NAME="$1"

elif [ "$1" = "-r" ] || [ "$1" = "-R" ] || [ "$1" = "--rootdir" ] || [ "$1" = "--ROOTDIR" ]; then
elif echo "$1" | grep -q -i -e "^-r$" -e "^--rootdir$"; then
if [ "${IS_ROOTDIR}" -ne 0 ]; then
echo "[ERROR] Already --rootdir(-r) option is specified." 1>&2
exit 1
fi
IS_ROOTDIR=1

elif [ "$1" = "-y" ] || [ "$1" = "-Y" ] || [ "$1" = "--yes" ] || [ "$1" = "--YES" ]; then
elif echo "$1" | grep -q -i -e "^-y$" -e "^--yes$"; then
if [ "${NO_INTERACTIVE}" -ne 0 ]; then
echo "[ERROR] Already --yes(-y) option is specified." 1>&2
exit 1
Expand Down Expand Up @@ -255,9 +255,9 @@ if [ "${NO_INTERACTIVE}" -eq 0 ]; then
printf '[INPUT] Confirm (y/n) : '
read -r CONFIRM

if [ "${CONFIRM}" = "y" ] || [ "${CONFIRM}" = "Y" ] || [ "${CONFIRM}" = "yes" ] || [ "${CONFIRM}" = "YES" ]; then
if echo "${CONFIRM}" | grep -q -i -e "^y$" -e "^yes$"; then
IS_CONFIRMED=1
elif [ "${CONFIRM}" = "n" ] || [ "${CONFIRM}" = "N" ] || [ "${CONFIRM}" = "no" ] || [ "${CONFIRM}" = "NO" ]; then
elif echo "${CONFIRM}" | grep -q -i -e "^n$" -e "^no$"; then
echo "Interrupt this processing, bye..."
exit 0
fi
Expand Down
Loading

0 comments on commit 86876dd

Please sign in to comment.