mirror of
https://github.com/outbackdingo/scratchpkg.git
synced 2026-03-19 20:13:36 +00:00
fix getpkginfo
This commit is contained in:
2
buildpkg
2
buildpkg
@@ -134,8 +134,8 @@ preparesource() {
|
||||
loadspkgbuild() {
|
||||
|
||||
if [ -f $BUILD_SCRIPT ]; then
|
||||
. $BUILD_SCRIPT
|
||||
getpkginfo
|
||||
. $BUILD_SCRIPT
|
||||
else
|
||||
msg "${color_red}Error no $BUILD_SCRIPT found.${color_reset}"
|
||||
exitscript1
|
||||
|
||||
@@ -117,9 +117,6 @@ updatesystemdb() {
|
||||
|
||||
getpkginfo() {
|
||||
|
||||
name=$(cat $BUILD_SCRIPT | grep ^name | cut -d '=' -f 2)
|
||||
version=$(cat $BUILD_SCRIPT | grep ^version | cut -d '=' -f 2)
|
||||
release=$(cat $BUILD_SCRIPT | grep ^release | cut -d '=' -f 2)
|
||||
description=$(cat $BUILD_SCRIPT | grep ^'# description' | tr -d ':' | cut -d ' ' -f 3-)
|
||||
homepage=$(cat $BUILD_SCRIPT | grep ^'# homepage' | tr -d ':' | cut -d ' ' -f 3-)
|
||||
maintainer=$(cat $BUILD_SCRIPT | grep ^'# maintainer' | tr -d ':' | cut -d ' ' -f 3-)
|
||||
|
||||
@@ -119,7 +119,7 @@ checkconflict() {
|
||||
while IFS=' ' read -r line; do
|
||||
pushd $ROOT_DIR
|
||||
if [ -f "$line" ] || [ -L "$line" ]; then
|
||||
msg "Conflict file!: ${color_yellow}/${line}${color_reset}"
|
||||
msg "Conflict file!: ${color_yellow}${line}${color_reset}"
|
||||
CONFLICT=yes
|
||||
fi
|
||||
popd
|
||||
|
||||
2
scratch
2
scratch
@@ -101,6 +101,7 @@ searchpkg() {
|
||||
if [ -f $PORT_DIR/$port/$out/$BUILD_SCRIPT ]; then
|
||||
pushd $PORT_DIR/$port/$out
|
||||
getpkginfo
|
||||
. $BUILD_SCRIPT
|
||||
popd
|
||||
if [ ! -z "$name" ] && [ ! -z "$version" ] && [ ! -z "$release" ]; then
|
||||
if [ -d $INDEX_DIR/$name ]; then
|
||||
@@ -205,6 +206,7 @@ showdepends() {
|
||||
if [ -f $PORT_DIR/$portdepends/$PACKAGE_DEPENDS/$BUILD_SCRIPT ]; then
|
||||
pushd $PORT_DIR/$portdepends/$PACKAGE_DEPENDS
|
||||
getpkginfo
|
||||
. $BUILD_SCRIPT
|
||||
popd
|
||||
break
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user