summaryrefslogtreecommitdiff
path: root/toru
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2012-01-22 23:06:56 -0600
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2012-01-22 23:06:56 -0600
commit7a00f2a55b69c39ae8ebad99b3d91a509b614b1b (patch)
tree7ca94ca289c069374cac149545a86234270d8fe6 /toru
parent825ac89cfa857e4379e9e1baf6d470cf9e583dde (diff)
parent0985429b68d8da1016bf4a84b2a2d32fb8c3027c (diff)
Merge branch 'master' of gitpar:libretools
Diffstat (limited to 'toru')
-rwxr-xr-xtoru27
1 files changed, 4 insertions, 23 deletions
diff --git a/toru b/toru
index 5867bfe..9616119 100755
--- a/toru
+++ b/toru
@@ -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..."