mirror of
https://github.com/starr-dusT/tzdb_to_nx
synced 2024-03-05 21:18:52 -08:00
Switch to POSIX sh for scripts
- GNU `bash` may not be installed or installed outside of /bin - *.sh only use `==` from Bash, so /bin/sh is enough
This commit is contained in:
parent
8c272f21d1
commit
6ca7f92b0e
2
externals/tz/CMakeLists.txt
vendored
2
externals/tz/CMakeLists.txt
vendored
@ -28,7 +28,7 @@ if (NOT EXISTS "${TZ_DIR}" OR NOT EXISTS "${TZIF_LIST_FILE}")
|
||||
|
||||
execute_process(
|
||||
COMMAND
|
||||
/bin/bash "${CMAKE_CURRENT_SOURCE_DIR}/find_tzif.sh" "${TZ_ZONEINFO_DIR}" "${TZIF_LIST_FILE}"
|
||||
sh "${CMAKE_CURRENT_SOURCE_DIR}/find_tzif.sh" "${TZ_ZONEINFO_DIR}" "${TZIF_LIST_FILE}"
|
||||
COMMAND_ERROR_IS_FATAL ANY
|
||||
)
|
||||
endif()
|
||||
|
4
externals/tz/find_tzif.sh
vendored
4
externals/tz/find_tzif.sh
vendored
@ -1,4 +1,4 @@
|
||||
#/bin/bash
|
||||
#/bin/sh
|
||||
set -e
|
||||
directory=$1
|
||||
tzif_list=$2
|
||||
@ -7,7 +7,7 @@ truncate -s 0 $tzif_list
|
||||
|
||||
for i in `find $directory -type f`; do
|
||||
header=`head -c 4 $i`
|
||||
if [ "$header" == "TZif" ]; then
|
||||
if [ "$header" = "TZif" ]; then
|
||||
echo "$i" >> $tzif_list
|
||||
fi
|
||||
done
|
||||
|
@ -50,7 +50,7 @@ add_custom_command(
|
||||
OUTPUT
|
||||
${BINARY_LIST_TXT}
|
||||
COMMAND
|
||||
bash ${CMAKE_CURRENT_SOURCE_DIR}/generate_binary_list_txt.sh ${BINARY_LIST_TXT}
|
||||
sh ${CMAKE_CURRENT_SOURCE_DIR}/generate_binary_list_txt.sh ${BINARY_LIST_TXT}
|
||||
WORKING_DIRECTORY
|
||||
${NX_ZONEINFO_DIR})
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
BINARY_LIST_TXT="$1"
|
||||
|
||||
# Fill text file with zone names
|
||||
@ -8,7 +8,7 @@ get_files_nx() {
|
||||
find $target -maxdepth 1 -type f -not -regex '.*Factory' | sort
|
||||
local DIRS=`find $target -maxdepth 1 -type d | sort`
|
||||
for i in $DIRS; do
|
||||
if [ "`readlink -e $i`" == "`readlink -e $target`" ]; then
|
||||
if [ "`readlink -e $i`" = "`readlink -e $target`" ]; then
|
||||
continue
|
||||
fi
|
||||
get_files_nx $i
|
||||
|
Loading…
x
Reference in New Issue
Block a user