From 1316ba7aa96c69ea541f1b7b3715aad5d1c8eb14 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 31 May 2013 18:52:49 -0600 Subject: [all tools]: use conf.sh (and libremessages if necessary) --- src/toru/toru-info | 2 +- src/toru/toru-utils | 20 ++++---------------- src/toru/toru-where | 4 +++- 3 files changed, 8 insertions(+), 18 deletions(-) (limited to 'src/toru') diff --git a/src/toru/toru-info b/src/toru/toru-info index 523f682..5b6fd01 100755 --- a/src/toru/toru-info +++ b/src/toru/toru-info @@ -1,6 +1,6 @@ #!/bin/bash # Prints info about a given pkgname -source /etc/libretools.conf +. libremessages for _pkg in $@; do _pkgbuild="$(toru-where $_pkg)" diff --git a/src/toru/toru-utils b/src/toru/toru-utils index 316e6b8..acf3776 100755 --- a/src/toru/toru-utils +++ b/src/toru/toru-utils @@ -1,27 +1,15 @@ #!/bin/bash -source /etc/abs.conf -source /etc/libretools.conf +. libremessages +. $(librelib conf.sh) +load_files libretools +check_vars libretools TORUPATH || exit 1 LASTSYNCFILE=${TORUPATH}/lastsync FORCE=false QUIET=false DEBUG=false -# usage : in_array( $needle, $haystack ) -function in_array { - [[ $2 ]] || return 1 # Not found - - local needle=$1; shift - local item - - for item in "$@"; do - [[ ${item#@} = $needle ]] && return 0 # Found - done - - return 1 # Not Found -} - # Stores the lastsync date lastsync() { local lastsyncfile diff --git a/src/toru/toru-where b/src/toru/toru-where index e9ab29d..8af3fb2 100755 --- a/src/toru/toru-where +++ b/src/toru/toru-where @@ -1,6 +1,8 @@ #!/bin/bash # Locates a PKGBUILD dir on toru's path cache -source /etc/libretools.conf +. $(librelib conf.sh) +load_files libretools +check_vars libretools TORUPATH || exit 1 PATHFILE=${TORUPATH}/paths.tch -- cgit v1.2.3-54-g00ecf