Remove config_parse() because it was causing trouble. Might as well just run pacini every time I want to fetch an option.

This commit is contained in:
David Thurstenson 2017-02-07 09:22:51 -06:00
parent 70b459b4e7
commit 94ca0038f5
2 changed files with 7 additions and 17 deletions

View File

@ -1,6 +1,6 @@
# Maintainer: David Thurstenson <thurstylark@gmail.com>
pkgname=tl-makepkg
pkgver=0.6
pkgver=0.7
pkgrel=1
pkgdesc="Small utility for running makepkg, then repose to add a local non-AUR package to a custom repo"
arch=('any')
@ -10,7 +10,7 @@ depends=('repose' 'pacutils')
backup=('etc/tl-makepkg.conf')
source=('tl-makepkg'
'tl-makepkg.conf')
md5sums=('a241835872805ff68ffc4e0bc687d778'
md5sums=('db3a09f25da6e05d53e19b20c1e563ce'
'938de8daea15f68500e969df422fd7fa')
package() {

View File

@ -2,27 +2,17 @@
declare -A config
conf="${CONFIG_FILE:-/etc/tl-makepkg.conf}"
errmsg() {
printf "Error in %s: %s\n" "${FUNCNAME[1]}" "$1" >&2
}
config_parse() { # Usage: config_parse <CONFIG_FILE>
if [[ ! -f "$1" ]]; then
errmsg "config file '$1' doesn't exist"
exit 1
fi
while IFS== read -r option value <(pacini "$1"); do
config["$option"]=$value
done
}
makepkg_run() { # Usage: makepkg_run <RepoDir> <MakepkgOpts>
PKGDEST="$1"
shift 1
makepkg "$@"
makepkg $@
}
config_parse "${CONFIG_FILE:-/etc/tl-makepkg.conf}"
makepkg_run "${config[RepoDir]}" "${config[MakepkgOpts]} $@"
repose "${config[ReposeOpts]}" --root "${config[MakepkgOpts]}" --pool "${config[MakepkgOpts]}" "${config[DBFile]}"
PKGDEST=$(pacini $conf RepoDir) makepkg $@ $(pacini $conf MakepkgOpts)
repose $(pacini $conf ReposeOpts) --root $(pacini $conf RepoDir) --pool $(pacini $conf RepoDir) $(pacini $conf DBFile)