]> git.saurik.com Git - apple/system_cmds.git/blame - zic.tproj/generate_zone_file_list.sh
system_cmds-805.250.2.tar.gz
[apple/system_cmds.git] / zic.tproj / generate_zone_file_list.sh
CommitLineData
1a7e3f61 1#!/bin/sh
cf37c299
A
2set -e
3set -x
1a7e3f61
A
4
5# we need to know where the data files are...
6if [ $# -ne 1 ]; then
7 echo "Usage: $0 DATA_FILES_DIR" 1>&2
8 exit 1
9fi
10
11DATFILES="$1"
cf37c299 12ZONE_FILES="$(egrep --files-with-match '^(Zone|Rule|Link)' "${DATFILES}"/* | awk -F "/" '{print $NF}')"
1a7e3f61
A
13
14for tz in ${ZONE_FILES}; do
15 if [ ${tz} = "backward" ]; then
16 DO_BACKWARD=1
17 continue
18 elif [ ${tz} = "backzone" ]; then
19 continue
20 else
21 echo "${tz}"
22 fi
23done
24
25if [ -n "$DO_BACKWARD" ]; then
26 echo "backward"
27fi
28