From 00877d81cc0c219b1ddb14d14e7be98afb7595c3 Mon Sep 17 00:00:00 2001 From: mattf Date: Thu, 2 Sep 2010 19:40:35 +0000 Subject: [PATCH] Move old data files if downloading new ones in areacode populate script git-svn-id: svn://192.168.202.10@1514 3d104415-ff17-0410-8863-d5cf3c621b8a --- .../branches/agc_2.2.0/bin/ADMIN_area_code_populate.pl | 8 +++++++- agc_2-X/trunk/bin/ADMIN_area_code_populate.pl | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/agc_2-X/branches/agc_2.2.0/bin/ADMIN_area_code_populate.pl b/agc_2-X/branches/agc_2.2.0/bin/ADMIN_area_code_populate.pl index 1696a828..d9909e33 100644 --- a/agc_2-X/branches/agc_2.2.0/bin/ADMIN_area_code_populate.pl +++ b/agc_2-X/branches/agc_2.2.0/bin/ADMIN_area_code_populate.pl @@ -2,7 +2,7 @@ # # ADMIN_area_code_populate.pl version 2.2.0 # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # Description: # server application that allows load areacodes into to asterisk list database @@ -17,6 +17,7 @@ # 90131-0933 - Added purge-table option to clear out old records before adding new ones # 90204-0806 - Added duplicate check to nanpa list loading # 90317-2353 - Added city, state, postal_code, country to nanpa format +# 100902-1536 - Move old data files if wgetting new ones # @@ -283,6 +284,11 @@ else print STDERR "Downloading latest phone codes tables\n"; + # move old files + `mv -f $PATHhome/phone_codes_GMT-latest-220.txt $PATHhome/phone_codes_GMT-latest-220-old.txt`; + `mv -f $PATHhome/GMT_USA_zip-latest.txt $PATHhome/GMT_USA_zip-latest-old.txt`; + + # get files `wget $URL1`; `wget $URL2`; } diff --git a/agc_2-X/trunk/bin/ADMIN_area_code_populate.pl b/agc_2-X/trunk/bin/ADMIN_area_code_populate.pl index 1696a828..d9909e33 100644 --- a/agc_2-X/trunk/bin/ADMIN_area_code_populate.pl +++ b/agc_2-X/trunk/bin/ADMIN_area_code_populate.pl @@ -2,7 +2,7 @@ # # ADMIN_area_code_populate.pl version 2.2.0 # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # Description: # server application that allows load areacodes into to asterisk list database @@ -17,6 +17,7 @@ # 90131-0933 - Added purge-table option to clear out old records before adding new ones # 90204-0806 - Added duplicate check to nanpa list loading # 90317-2353 - Added city, state, postal_code, country to nanpa format +# 100902-1536 - Move old data files if wgetting new ones # @@ -283,6 +284,11 @@ else print STDERR "Downloading latest phone codes tables\n"; + # move old files + `mv -f $PATHhome/phone_codes_GMT-latest-220.txt $PATHhome/phone_codes_GMT-latest-220-old.txt`; + `mv -f $PATHhome/GMT_USA_zip-latest.txt $PATHhome/GMT_USA_zip-latest-old.txt`; + + # get files `wget $URL1`; `wget $URL2`; }