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