Skip to content

prun: Allow profile filename as package name #432

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions prun/prun
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ if [ $# -lt 2 ]; then
echo "usage: prun package command ..." >&2
exit 1
fi
arg1=$1;shift
arg1=$1; shift
set -- $arg1 "$@"
pkg=$1;shift;
. /usr/local/package/lib/$pkg.profile
pkg=$1; shift;
if [[ "$pkg" == */* ]]; then
. $pkg
else
. /usr/local/package/lib/$pkg.profile
fi
exec "$@"