Created
December 18, 2012 02:05
-
-
Save japhb/4324368 to your computer and use it in GitHub Desktop.
Current iteration of "clean, pull, and build a new rakudo, then reinstall modules" script
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
#!/bin/bash | |
# Save existing panda state | |
STATE_DIR=~/git/rakudo-current-lib/site/panda | |
STATE_FILE=$STATE_DIR/state | |
SAVE_DIR=~/.perl6 | |
SAVE_FILE=$SAVE_DIR/panda-state.save | |
[[ -e $STATE_FILE ]] && [[ -e $SAVE_FILE ]] && cp -a $SAVE_FILE $SAVE_FILE.bak | |
[[ -e $STATE_FILE ]] && ( mkdir -p $SAVE_DIR; cp -a $STATE_FILE $SAVE_FILE ) | |
# Clean out old rakudo | |
cd ~/git/rakudo-current/ | |
make realclean | |
rm -rf install | |
# Pull and build a new rakudo; bail out if this doesn't work | |
git pull | |
perl Configure.pl --gen-parrot && make && make install || exit | |
# Fix up rakudo-current-lib | |
CURRENT_LIB=`./perl6 -e '%*CUSTOM_LIB<site> ~~ m{^(.*)\/<-[/]>+\/?$}; say ~$0'` | |
cd ~/git | |
rm rakudo-current-lib | |
ln -s $CURRENT_LIB rakudo-current-lib | |
# Restore panda state and reboostrap with a new panda | |
[[ -e $SAVE_FILE ]] && ( mkdir -p $STATE_DIR; cp -a $SAVE_FILE $STATE_FILE ) | |
cd ~/git/panda | |
git pull | |
./rebootstrap.pl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment