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

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

adding 'check update' popup

  • Property svn:executable set to *
RevLine 
[175]1#!/bin/sh
2#
[1573]3# execute apt-get upate for update-watch
[175]4
[1573]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
[175]15fi
Note: See TracBrowser for help on using the repository browser.