fix script path
This commit is contained in:
13
mksrcinfo.sh
13
mksrcinfo.sh
@ -7,12 +7,6 @@ section_arch_fields=(source depends checkdepends makedepends optdepends provides
|
|||||||
section_array_fields=(arch groups license noextract options backup validpgpkeys "${section_arch_fields[@]}")
|
section_array_fields=(arch groups license noextract options backup validpgpkeys "${section_arch_fields[@]}")
|
||||||
section_fields=("${section_scalar_fields[@]}" "${section_array_fields[@]}")
|
section_fields=("${section_scalar_fields[@]}" "${section_array_fields[@]}")
|
||||||
|
|
||||||
# load PKGBUILD
|
|
||||||
set -e
|
|
||||||
cat "${1:-./PKGBUILD}"
|
|
||||||
source "${1:-./PKGBUILD}"
|
|
||||||
set +e
|
|
||||||
|
|
||||||
# check if a variable is an array
|
# check if a variable is an array
|
||||||
is_array() {
|
is_array() {
|
||||||
[[ "$(declare -p $1)" =~ "declare -a" ]]
|
[[ "$(declare -p $1)" =~ "declare -a" ]]
|
||||||
@ -77,6 +71,13 @@ print_section_content() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# main
|
# main
|
||||||
|
for field in "${base_fields[@]}"; do
|
||||||
|
eval "unset $field"
|
||||||
|
done
|
||||||
|
clear_fields
|
||||||
|
|
||||||
|
# load PKGBUILD
|
||||||
|
source "${1:-./PKGBUILD}"
|
||||||
|
|
||||||
# determine pkgbase
|
# determine pkgbase
|
||||||
if ! is_array pkgname; then
|
if ! is_array pkgname; then
|
||||||
|
|||||||
Reference in New Issue
Block a user