Drop both empty and commented lines before parsing config. Correct vim modeline. Add src sums
This commit is contained in:
parent
25c3f6c848
commit
0a933dec19
7
PKGBUILD
7
PKGBUILD
|
@ -1,16 +1,17 @@
|
||||||
# Maintainer: David Thurstenson <thurstylark@gmail.com>
|
# Maintainer: David Thurstenson <thurstylark@gmail.com>
|
||||||
pkgname=tl-makepkg
|
pkgname=tl-makepkg
|
||||||
pkgver=0.1
|
pkgver=0.2
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Small utility for running makepkg, then repose to add a local non-AUR package to a custom repo"
|
pkgdesc="Small utility for running makepkg, then repose to add a local non-AUR package to a custom repo"
|
||||||
arch=('any')
|
arch=('any')
|
||||||
url="https://git.thurstylark.com/tl-makepkg.git/"
|
url="https://git.thurstylark.com/tl-makepkg.git/"
|
||||||
license=('GPL')
|
license=('GPL')
|
||||||
depends=('makepkg' 'repose')
|
depends=('repose')
|
||||||
backup=(etc/tl-makepkg.conf)
|
backup=(etc/tl-makepkg.conf)
|
||||||
source=('tl-makepkg'
|
source=('tl-makepkg'
|
||||||
'tl-makepkg.conf')
|
'tl-makepkg.conf')
|
||||||
md5sums=()
|
md5sums=('786357e6ade3773b04a3999bd1ebeecd'
|
||||||
|
'90f485bc5e44599a2e2e7b8c49a140fc')
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
install -Dm755 tl-makepkg ${pkgdir}/usr/bin/tl-makepkg
|
install -Dm755 tl-makepkg ${pkgdir}/usr/bin/tl-makepkg
|
||||||
|
|
|
@ -13,9 +13,11 @@ config_parse() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
while IFS='' read -r line || [[ -n "$line" ]]; do
|
while IFS='' read -r line || [[ -n "$line" ]]; do
|
||||||
[[ "$line" =~ ^#.*$ ]] && continue # Skip lines that start with '#'
|
#[[ "$line" =~ ^#.*$ ]] && continue # Skip lines that start with '#'
|
||||||
config[${line%%=*}]=${line##*=} # ref: http://wiki.bash-hackers.org/syntax/pe#substring_removal
|
local option=${line%%=*}
|
||||||
done < "$1"
|
local value=${line##*=} # ref: http://wiki.bash-hackers.org/syntax/pe#substring_removal
|
||||||
|
config["$option"]=$value
|
||||||
|
done < <(sed '/^$/d;/^#.*$/d' "$1")
|
||||||
}
|
}
|
||||||
|
|
||||||
makepkg_run() {
|
makepkg_run() {
|
||||||
|
|
|
@ -12,4 +12,4 @@ REPOSE_OPTS=--verbose --files --xz
|
||||||
MAKEPKG_OPTS=
|
MAKEPKG_OPTS=
|
||||||
|
|
||||||
|
|
||||||
# vim: set ft=dosini
|
# vim: set ft=dosini:
|
||||||
|
|
Loading…
Reference in New Issue