Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nxadm/c03abdf01d5d45d9edd149cc7f2134d4 to your computer and use it in GitHub Desktop.
Save nxadm/c03abdf01d5d45d9edd149cc7f2134d4 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