Revision 3774,
428 bytes
checked in by kazutaka, 12 years ago
(diff) |
tags/1.xからインポート
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | # |
---|
3 | # execute apt-get upate for update-watch |
---|
4 | |
---|
5 | # extract URL from sources.list.d/main.list |
---|
6 | URL=`grep "^rpm" /etc/apt/sources.list.d/main.list | head -1 | awk '{for(i=1;i<=NF;i++) {if ($i ~ /tp:/) print $i}}'` |
---|
7 | |
---|
8 | # check network connection |
---|
9 | if wget -q --spider $URL ; then |
---|
10 | |
---|
11 | # do apt-get update when network is available |
---|
12 | if [ -x /usr/bin/update-watch ]; then |
---|
13 | /usr/bin/apt-get update > /dev/null 2>&1 |
---|
14 | fi |
---|
15 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.