4 # get_definitions.command
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.
18 $KEY_FILE = "current.txt";
19 $DOWNLOAD_DIR = "downloaded_definitions";
20 $ACTIVE_DIR = "active_definitions";
23 $MKDIR = "/bin/mkdir";
24 $CURL = "/usr/bin/curl";
25 $UNTARGZIP = "/usr/bin/tar -xzf";
31 $DOWNLOAD_ADDR = "http://www.karlk.net/downloads/software/definitions/";
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`;
44 `$CURL $DOWNLOAD_ADDR/$current.$EXTENSION > $DOWNLOAD_DIR/$current.$EXTENSION`;
45 `$UNTARGZIP $DOWNLOAD_DIR/$current.$EXTENSION -C $ACTIVE_DIR/`;