Created
January 29, 2021 11:16
-
-
Save jonathanstowe/a7e5401c74d0b3c4e7b862f14af2e769 to your computer and use it in GitHub Desktop.
make profile.d for installed rakudo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROFILE_SCRIPT=/etc/profile.d/$PKG_NAME.sh | |
/usr/bin/cat - <<EOSCR >$PROFILE_SCRIPT | |
RAKUDO_PATHS=$INSTALL_PREFIX/bin | |
for TOP in raku perl6 | |
do | |
if [ -d $INSTALL_PREFIX/share/\$TOP ] | |
then | |
for REP in site vendor core | |
do | |
if [ -d $INSTALL_PREFIX/share/\$TOP/\$REP/bin ] | |
then | |
RAKUDO_PATHS="\$RAKUDO_PATHS:$INSTALL_PREFIX/share/\$TOP/\$REP/bin" | |
fi | |
done | |
fi | |
done | |
if ! echo "\$PATH" | /bin/grep -Eq "(^|:)\$RAKUDO_PATHS($|:)" ; then | |
export PATH="\$PATH:\$RAKUDO_PATHS" | |
fi | |
EOSCR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment