Last change
on this file since 12449 was 10525, checked in by rick, 13 years ago |
Show why we continue if the internal fails
|
-
Property svn:executable
set to
*
|
File size:
733 bytes
|
Line | |
---|
1 | #!/bin/sh
|
---|
2 | #
|
---|
3 | # Very simple wrapper to update wlconfig.wirelessleiden.nl without the need of
|
---|
4 | # a webbrowser
|
---|
5 |
|
---|
6 | INTERNAL_URL='http://sunny.wleiden.net/wleiden/config/?action=update&source=internal'
|
---|
7 | EXTERNAL_URL='http://sunfire.wirelessleiden.nl/wleiden/config/?action=update&source=external'
|
---|
8 | CLI=`whereis -b fetch wget curl false | awk '{if ($2) {print $2;exit}}'`
|
---|
9 |
|
---|
10 |
|
---|
11 | case `basename $CLI` in
|
---|
12 | "wget") CLI_ARGS="-O - -nv";;
|
---|
13 | "curl") CLI_ARGS="-o -";;
|
---|
14 | "fetch") CLI_ARGS="-o -";;
|
---|
15 | "false") echo "# no URL fetcher found"; exit 1;;
|
---|
16 | esac
|
---|
17 |
|
---|
18 | echo "# Processing via internal URL ($INTERNAL_URL) please wait..."
|
---|
19 | $CLI $CLI_ARGS $INTERNAL_URL || {
|
---|
20 | echo "# Processing via external URL ($EXTERNAL_URL) please wait..."
|
---|
21 | $CLI $CLI_ARGS $EXTERNAL_URL
|
---|
22 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.