Skip to content

Instantly share code, notes, and snippets.

@jonathanstowe
Created January 29, 2021 11:16
Show Gist options
  • Save jonathanstowe/a7e5401c74d0b3c4e7b862f14af2e769 to your computer and use it in GitHub Desktop.
Save jonathanstowe/a7e5401c74d0b3c4e7b862f14af2e769 to your computer and use it in GitHub Desktop.
make profile.d for installed rakudo
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