diff options
author | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2012-02-04 13:17:05 -0300 |
---|---|---|
committer | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2012-02-04 13:17:05 -0300 |
commit | 3fb8e62b798c0dffb201727439a6a0d90bc1b20f (patch) | |
tree | f69c1b6db4082e9188f22be8d3d3d5cc5212f34f /toru | |
parent | 5ab36af3c7a505ff40bb8ca46ec387b94d85cbdf (diff) | |
parent | 9808018ca09050ade144d0dfc0b0b6edadefa368 (diff) |
Merge branch 'master' of ssh://gparabola/libretools
Conflicts:
libremakepkg
Diffstat (limited to 'toru')
-rwxr-xr-x | toru | 27 |
1 files changed, 4 insertions, 23 deletions
@@ -12,28 +12,7 @@ # * Possibility to hook up ABS dirs besides ABSROOT (low priority) # * Tell updates and non available binary packages (working on this) -source /etc/abs.conf -source /etc/libretools.conf - -if [ ! -w "$TORUPATH" ]; then - error "Toru's path isn't writable. Please check $TORUPATH" - exit 1 -fi - -# Stores the lastsync date -lastsync() { - local lastsyncfile - - lastsyncfile=$1 - - [ -e ${lastsyncfile} -a ! -w ${lastsyncfile} ] && { - error "The sync date can't be saved. ${lastsyncfile} isn't writable." - return 1 - } - - date +%s > ${lastsyncfile} - touch ${lastsyncfile} -} +source $(dirname $0)/toru-utils # Saves contents on a named cache # $1 cache name (repo) @@ -252,7 +231,9 @@ update() { # See above FIXME # print_package_array "${updates[@]}" > ${TMPDIR}/updates - store_cache ${_repo}.updates ${TMPDIR}/updates + if [ -r ${TMPDIR}/updates ]; then + store_cache ${_repo}.updates ${TMPDIR}/updates + fi else $quiet || msg "Reading updates from cache..." |