Created
October 28, 2010 15:59
-
-
Save IanVaughan/651664 to your computer and use it in GitHub Desktop.
Installing perl modules for Bugzilla when no internet access
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/sh | |
# Download locations | |
# http://www.bugzilla.org/docs/3.6/en/html/modules-manual-download.html | |
# http://www.bugzilla.org/docs/3.6/en/html/modules-manual-optional.html | |
LOGFILE=install_progress.txt | |
PROCESSED_FILES_DIR=processed_files | |
mkdir -p ${PROCESSED_FILES_DIR} | |
#for file in *.gz | |
for FILE in `ls *.tar.gz`; do | |
echo "Processing : $FILE..." | |
echo "Processing : $FILE..." >> ${LOGFILE} | |
FILENAME=${FILE%*.tar.gz} | |
# unzip and move | |
tar -xzvf $FILE >> ${LOGFILE} | |
mv $FILE ${PROCESSED_FILES_DIR} | |
# make and install | |
cd ${FILENAME} | |
#newer/older? perl modules that have "Build.PL" instead of "Makefile.PL" | |
MAKE= | |
if -e Makefile.PL; then | |
MAKE=make | |
perl Makefile.PL >> ../$LOGFILE | |
else | |
MAKE=./Buildperl Build.PL >> ../$LOGFILE | |
fi | |
#make | |
#make test | |
#make install | |
$MAKE >> ../$LOGFILE | |
$MAKE test >> ../$LOGFILE | |
$MAKE install >> ../$LOGFILE | |
cd .. | |
echo "Done : $FILE..." >> ${LOGFILE} | |
echo "********************" >> ${LOGFILE} | |
echo | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment