Skip to content

Commit

Permalink
Updated building/packaging scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Takeshi Nakatani committed Mar 6, 2023
1 parent 7fa6703 commit f1126d0
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 33 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/phpext_helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#
# AUTHOR: Takeshi Nakatani
# CREATE: Fri, Feb 24 2022
# REVISION:
# REVISION: 1.1
#

#==============================================================
Expand All @@ -33,16 +33,18 @@ PIPEFAILURE_FILE="/tmp/.pipefailure.$(od -An -tu4 -N4 /dev/random | tr -d ' \n')
#
# For shellcheck
#
if locale -a | grep -q -i '^[[:space:]]*C.utf8[[:space:]]*$'; then
LANG=$(locale -a | grep -i '^[[:space:]]*C.utf8[[:space:]]*$' | sed -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*$//g' | tr -d '\n')
LC_ALL="${LANG}"
export LANG
export LC_ALL
elif locale -a | grep -q -i '^[[:space:]]*en_US.utf8[[:space:]]*$'; then
LANG=$(locale -a | grep -i '^[[:space:]]*en_US.utf8[[:space:]]*$' | sed -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*$//g' | tr -d '\n')
LC_ALL="${LANG}"
export LANG
export LC_ALL
if command -v locale >/dev/null 2>&1; then
if locale -a | grep -q -i '^[[:space:]]*C.utf8[[:space:]]*$'; then
LANG=$(locale -a | grep -i '^[[:space:]]*C.utf8[[:space:]]*$' | sed -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*$//g' | tr -d '\n')
LC_ALL="${LANG}"
export LANG
export LC_ALL
elif locale -a | grep -q -i '^[[:space:]]*en_US.utf8[[:space:]]*$'; then
LANG=$(locale -a | grep -i '^[[:space:]]*en_US.utf8[[:space:]]*$' | sed -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*$//g' | tr -d '\n')
LC_ALL="${LANG}"
export LANG
export LC_ALL
fi
fi

#==============================================================
Expand Down
24 changes: 13 additions & 11 deletions buildutils/php_debian_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#
# AUTHOR: Takeshi Nakatani
# CREATE: Tue, Feb 22 2022
# REVISION:
# REVISION: 1.1
#

#==============================================================
Expand All @@ -33,16 +33,18 @@ PIPEFAILURE_FILE="/tmp/.pipefailure.$(od -An -tu4 -N4 /dev/random | tr -d ' \n')
#
# For shellcheck
#
if locale -a | grep -q -i '^[[:space:]]*C.utf8[[:space:]]*$'; then
LANG=$(locale -a | grep -i '^[[:space:]]*C.utf8[[:space:]]*$' | sed -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*$//g' | tr -d '\n')
LC_ALL="${LANG}"
export LANG
export LC_ALL
elif locale -a | grep -q -i '^[[:space:]]*en_US.utf8[[:space:]]*$'; then
LANG=$(locale -a | grep -i '^[[:space:]]*en_US.utf8[[:space:]]*$' | sed -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*$//g' | tr -d '\n')
LC_ALL="${LANG}"
export LANG
export LC_ALL
if command -v locale >/dev/null 2>&1; then
if locale -a | grep -q -i '^[[:space:]]*C.utf8[[:space:]]*$'; then
LANG=$(locale -a | grep -i '^[[:space:]]*C.utf8[[:space:]]*$' | sed -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*$//g' | tr -d '\n')
LC_ALL="${LANG}"
export LANG
export LC_ALL
elif locale -a | grep -q -i '^[[:space:]]*en_US.utf8[[:space:]]*$'; then
LANG=$(locale -a | grep -i '^[[:space:]]*en_US.utf8[[:space:]]*$' | sed -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*$//g' | tr -d '\n')
LC_ALL="${LANG}"
export LANG
export LC_ALL
fi
fi

#----------------------------------------------------------
Expand Down
24 changes: 13 additions & 11 deletions buildutils/php_rpm_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#
# AUTHOR: Takeshi Nakatani
# CREATE: Fri, Feb 18 2022
# REVISION:
# REVISION: 1.1
#

#==============================================================
Expand All @@ -33,16 +33,18 @@
#
# For shellcheck
#
if locale -a | grep -q -i '^[[:space:]]*C.utf8[[:space:]]*$'; then
LANG=$(locale -a | grep -i '^[[:space:]]*C.utf8[[:space:]]*$' | sed -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*$//g' | tr -d '\n')
LC_ALL="${LANG}"
export LANG
export LC_ALL
elif locale -a | grep -q -i '^[[:space:]]*en_US.utf8[[:space:]]*$'; then
LANG=$(locale -a | grep -i '^[[:space:]]*en_US.utf8[[:space:]]*$' | sed -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*$//g' | tr -d '\n')
LC_ALL="${LANG}"
export LANG
export LC_ALL
if command -v locale >/dev/null 2>&1; then
if locale -a | grep -q -i '^[[:space:]]*C.utf8[[:space:]]*$'; then
LANG=$(locale -a | grep -i '^[[:space:]]*C.utf8[[:space:]]*$' | sed -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*$//g' | tr -d '\n')
LC_ALL="${LANG}"
export LANG
export LC_ALL
elif locale -a | grep -q -i '^[[:space:]]*en_US.utf8[[:space:]]*$'; then
LANG=$(locale -a | grep -i '^[[:space:]]*en_US.utf8[[:space:]]*$' | sed -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*$//g' | tr -d '\n')
LC_ALL="${LANG}"
export LANG
export LC_ALL
fi
fi

#----------------------------------------------------------
Expand Down

0 comments on commit f1126d0

Please sign in to comment.