Removed old commented-out code.
[CleverRabbit.git] / get_definitions.command
blob9c657cb2038295b614ba810ba9a240ae9ba03cdd
1 #!/usr/bin/perl
4 # get_definitions.command
5 # (RomanToKhmer.app)
7 # Copyright (c) 2002-2005 A. Karl Keller (http://karlk.net)
9 # This code is open-source, free software, made available without warranty under
10 # the terms of the GNU General Public License, either version 2 or later (see
11 # http://www.gnu.org/licenses/gpl.html or included copy); as such, it may be
12 # redistributed and/or modified in accordance with that document.
16 # $local_testing = 1;
18 $KEY_FILE = "current.txt";
19 $DOWNLOAD_DIR = "downloaded_definitions";
20 $ACTIVE_DIR = "active_definitions";
21 $EXTENSION = "tgz";
23 $MKDIR = "/bin/mkdir";
24 $CURL = "/usr/bin/curl";
25 $UNTARGZIP = "/usr/bin/tar -xzf";
26 $MV = "/bin/mv";
27 $LS = "/bin/ls";
29 if(!$local_testing)
31 $DOWNLOAD_ADDR = "http://www.karlk.net/downloads/software/definitions/";
32 }else{
33 $DOWNLOAD_ADDR = "http://ibook-akk.local/~karl/karlk.net/public_html/downloads/software/definitions/";
34 `echo "Local RK testing build." > testing.txt`;
35 `open -a TextEdit testing.txt`;
38 `$MKDIR $DOWNLOAD_DIR` unless -e $DOWNLOAD_DIR;
39 `$MKDIR $ACTIVE_DIR` unless -e $ACTIVE_DIR;
41 $current = `$CURL $DOWNLOAD_ADDR/$KEY_FILE`;
42 chomp $current;
44 `$CURL $DOWNLOAD_ADDR/$current.$EXTENSION > $DOWNLOAD_DIR/$current.$EXTENSION`;
45 `$UNTARGZIP $DOWNLOAD_DIR/$current.$EXTENSION -C $ACTIVE_DIR/`;