Skip to content

Instantly share code, notes, and snippets.

@IanVaughan
Created October 28, 2010 15:59
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 IanVaughan/651664 to your computer and use it in GitHub Desktop.
Save IanVaughan/651664 to your computer and use it in GitHub Desktop.
Installing perl modules for Bugzilla when no internet access
#!/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