source: projects/update-watch/trunk/update-watch.cron @ 3774

Revision 3774, 428 bytes checked in by kazutaka, 11 years ago (diff)

tags/1.xからインポート

  • Property svn:executable set to *
RevLine 
[3774]1#!/bin/sh
2#
3# execute apt-get upate for update-watch
4
5# extract URL from sources.list.d/main.list
6URL=`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
9if 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
15fi
Note: See TracBrowser for help on using the repository browser.