Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added fix for findutilsport #575

Merged
merged 2 commits into from
Nov 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions bin/zopen-install
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
# All zopen-* scripts MUST start with this code to maintain consistency
#
# set -x
setupMyself()
{
ME=$(basename $0)
Expand Down Expand Up @@ -68,6 +69,14 @@ handlePackageInstall()
tagged=$(echo "${fullname}" | cut -s -d '%' -f 2)
printVerbose "Name:${name};version:${versioned};tag:${tagged};repo:${repo}"
printHeader "Installing package: ${name}"
nameSansPort=$(echo "${name}" | sed -e 's#\(.*\)port$#\1#')
# findutilsport -> findutils
# findutils -> findutils
if [[ "${nameSansPort}" != "${name}" ]] ; then
echo "Usage error: please install using base project name without port suffix."
echo " try: zopen install ${nameSansPort}"
exit 1
fi

getAllReleasesFromGithub "${repo}"

Expand Down Expand Up @@ -648,10 +657,10 @@ if ${all}; then
installArray=$(strtrim "${installArray}")
else
for chosenRepo in $(echo "${chosenRepos}" | tr ',' '\n'); do
printVerbose "Processing repo: ${chosenRepo}."
printVerbose "Stripping any version (%), tag (#) or port suffixes."
toolrepo=$(echo "${chosenRepo}" | sed -e 's#%.*##' -e 's#=.*##' -e 's#.*port##')
printVerbose "Adding prefix and 'port' suffix." # quicker than testing for presence!
printVerbose "Processing repo: ${chosenrepo}"
printVerbose "Stripping any version (%), tag (#) or port suffixes"
toolrepo=$(echo "${chosenRepo}" | sed -e 's#%.*##' -e 's#=.*##' -e 's#\(.*\)port$#\1#')
printVerbose "Adding prefix and 'port' suffix" # quicker than testing for presence!
toolfound=$(echo "${repo_results}" | awk -vtoolrepo="${toolrepo}" '$0 == toolrepo {print}')
if [ "${toolfound}" = "${toolrepo}" ]; then
printVerbose "Adding '${chosenRepo}' to the install queue."
Expand Down