source: projects/update-watch/branch/1.x/update-watch.cron @ 1573

Revision 1573, 428 bytes checked in by kazutaka, 12 years ago (diff)

adding 'check update' popup

  • 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
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.