mirror of
https://github.com/starr-dusT/tzdb_to_nx
synced 2024-03-05 21:18:52 -08:00
commit
73fcec9bda
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
|
||||
|
@ -24,7 +24,7 @@ execute_process(
|
||||
|
||||
string(REPLACE "\n" "" TZ_COMMIT_TIME "${TZ_COMMIT_TIME}")
|
||||
|
||||
if (APPLE)
|
||||
if (APPLE OR CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|NetBSD|OpenBSD")
|
||||
set(VERSION_COMMAND ${GNU_DATE} -r ${TZ_COMMIT_TIME} +%y%m%d)
|
||||
else ()
|
||||
set(VERSION_COMMAND ${GNU_DATE} +%y%m%d --date=@${TZ_COMMIT_TIME})
|
||||
@ -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