Compare commits
2 Commits
bb58beecda
...
79dbac7647
Author | SHA1 | Date | |
---|---|---|---|
79dbac7647 | |||
9f5096eb27 |
@ -349,6 +349,21 @@ check_pkg_mtime() { # can be called even if some sources are missing
|
|||||||
[ "$PKGMK_MTIME_ONLY" = "yes" ] && info "$msg"; return $utd
|
[ "$PKGMK_MTIME_ONLY" = "yes" ] && info "$msg"; return $utd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_basename() {
|
||||||
|
echo "${1##*/}"
|
||||||
|
}
|
||||||
|
|
||||||
|
get_filename() {
|
||||||
|
local ABSOLUTE=""
|
||||||
|
[ "$1" = "-a" ] && { ABSOLUTE=1; shift; }
|
||||||
|
|
||||||
|
if [[ $1 =~ ^(http|https|ftp|file)://.*/(.+) ]]; then
|
||||||
|
echo "$PKGMK_SOURCE_DIR/${BASH_REMATCH[2]}"
|
||||||
|
else
|
||||||
|
[ "$ABSOLUTE" ] && echo "$PKGMK_ROOT/$1" || echo "$1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
fetch_url() {
|
fetch_url() {
|
||||||
local u="$1"; local h="$2"; local finished=0; local giturl tag CLONE_ARGS
|
local u="$1"; local h="$2"; local finished=0; local giturl tag CLONE_ARGS
|
||||||
local SAVE_AS REPO OCONTINUE OOUT; local m=0
|
local SAVE_AS REPO OCONTINUE OOUT; local m=0
|
||||||
|
@ -156,7 +156,7 @@ sub keeplist { # remember to pop off the last two elements for regex purposes
|
|||||||
push(@keepers, $ki);
|
push(@keepers, $ki);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
push (@keepers, "$name#$version.*\.pkg\.tar\.$compression_mode");
|
push (@keepers, "$name#$version-$release\.pkg\.tar\.$compression_mode");
|
||||||
push (@keepers, "$name#.*\.pkg\.tar\.$compression_mode");
|
push (@keepers, "$name#.*\.pkg\.tar\.$compression_mode");
|
||||||
return @keepers;
|
return @keepers;
|
||||||
}
|
}
|
||||||
@ -214,7 +214,6 @@ sub getportdirs { # returns scalar references to two arrays
|
|||||||
$line =~ s/^prtdir\s+//; #remove the leading directive
|
$line =~ s/^prtdir\s+//; #remove the leading directive
|
||||||
$line =~ s/#.*$//; #strip inline comments like this one
|
$line =~ s/#.*$//; #strip inline comments like this one
|
||||||
$line =~ s/\s+//g; #collapse all whitespace, even if in a path!
|
$line =~ s/\s+//g; #collapse all whitespace, even if in a path!
|
||||||
#(not that we ever put spaces or commas in repo names anyway)
|
|
||||||
if ( $line !~ /:/ ) {
|
if ( $line !~ /:/ ) {
|
||||||
push @basedirs, $line if (-d $line);
|
push @basedirs, $line if (-d $line);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user