forked from caylakpenguen/bash-scripts
Slackware iso an rsync script
This commit is contained in:
parent
7829233bfe
commit
77ea5b95d8
82
makeSlackISOs.sh
Normal file
82
makeSlackISOs.sh
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Shell script to build (unofficial) Slackware-current ISOs
|
||||||
|
#
|
||||||
|
# Lars Strand - larstra (at) ifi uio no
|
||||||
|
#
|
||||||
|
# Last update: Sun Nov 10 20:49:57 CET 2013
|
||||||
|
#
|
||||||
|
|
||||||
|
DATE=`date +"%d_%b_%Y"`
|
||||||
|
MD5SUM="/usr/bin/md5sum"
|
||||||
|
|
||||||
|
CURRENT="slackware-current-$DATE-DVD.iso"
|
||||||
|
CURRENT64="slackware64-current-$DATE-DVD.iso"
|
||||||
|
|
||||||
|
LOC_CURRENT="/usit/ftp1/ftp/slackware/slackware-current"
|
||||||
|
LOC_CURRENT64="/usit/ftp1/ftp/slackware/slackware64-current"
|
||||||
|
|
||||||
|
DUMP="/usit/ftp1/ftp/slackware/slackware-iso/slackware-current-iso"
|
||||||
|
MKISOFS="/usr/bin/mkisofs"
|
||||||
|
|
||||||
|
# remove the old build
|
||||||
|
rm -rf $DUMP/*
|
||||||
|
|
||||||
|
# build DVD CURRENT ISO
|
||||||
|
cd $LOC_CURRENT/
|
||||||
|
|
||||||
|
$MKISOFS -o $DUMP/$CURRENT \
|
||||||
|
-R -J -V "Slackware-current DVD" \
|
||||||
|
-x ./source \
|
||||||
|
-hide-rr-moved \
|
||||||
|
-v -d -N -no-emul-boot -boot-load-size 4 -boot-info-table \
|
||||||
|
-sort isolinux/iso.sort \
|
||||||
|
-b isolinux/isolinux.bin \
|
||||||
|
-c isolinux/isolinux.boot \
|
||||||
|
-p "Slackware-current build from slackware.no - NOT OFFICIAL" \
|
||||||
|
-publisher "Slackware-current build from slackware.no - NOT OFFICIAL" \
|
||||||
|
-A "Slackware-current DVD - build $DATE" .
|
||||||
|
|
||||||
|
# build DVD CURRENT 64 ISO
|
||||||
|
cd $LOC_CURRENT64/
|
||||||
|
|
||||||
|
$MKISOFS -o $DUMP/$CURRENT64 \
|
||||||
|
-R -J -V "Slackware64-current DVD" \
|
||||||
|
-x ./source \
|
||||||
|
-hide-rr-moved \
|
||||||
|
-v -d -N -no-emul-boot -boot-load-size 4 -boot-info-table \
|
||||||
|
-sort isolinux/iso.sort \
|
||||||
|
-b isolinux/isolinux.bin \
|
||||||
|
-c isolinux/isolinux.boot \
|
||||||
|
-p "Slackware64-current build from slackware.no - NOT OFFICIAL" \
|
||||||
|
-publisher "Slackware64-current build from slackware.no - NOT OFFICIAL" \
|
||||||
|
-A "Slackware64-current DVD - build $DATE" .
|
||||||
|
|
||||||
|
# jump to right build location
|
||||||
|
cd $DUMP
|
||||||
|
|
||||||
|
# copy the Changelog, so folks know what's included
|
||||||
|
cp -l $LOC_CURRENT/ChangeLog.txt ChangeLog-current.txt
|
||||||
|
cp -l $LOC_CURRENT64/ChangeLog.txt ChangeLog64-current.txt
|
||||||
|
|
||||||
|
# make MD5 sums of the ISOs
|
||||||
|
$MD5SUM $CURRENT > CHECKSUMS.md5
|
||||||
|
$MD5SUM $CURRENT64 >> CHECKSUMS.md5
|
||||||
|
|
||||||
|
# bump warning
|
||||||
|
echo "** WARNING! **
|
||||||
|
This is experimental current ISO builds. They are NOT official,
|
||||||
|
so use at your own risk!
|
||||||
|
|
||||||
|
If you have any comments/suggestions/error-reports regarding these ISOs,
|
||||||
|
let me know so I can improve the build-script! You'll find the script
|
||||||
|
at: http://www.slackware.no/makeSlackISOs.sh
|
||||||
|
|
||||||
|
New build every Tuesday at 0500 CET/CEST
|
||||||
|
|
||||||
|
Enjoy!
|
||||||
|
|
||||||
|
larstra (at) ifi uio no
|
||||||
|
" > README.TXT
|
||||||
|
|
||||||
|
# end
|
123
slack-get.sh
Normal file
123
slack-get.sh
Normal file
|
@ -0,0 +1,123 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Lars Strand
|
||||||
|
#
|
||||||
|
# slackware.no
|
||||||
|
#
|
||||||
|
# Sun Nov 10 20:34:08 CET 2013
|
||||||
|
#
|
||||||
|
|
||||||
|
export RSYNC_PASSWORD=Sei0oona
|
||||||
|
|
||||||
|
file=/var/www/virtual/www.slackware.no/rsynclogs/slackware/rsync_`date +%Y-%m-%d`
|
||||||
|
file2=/dev/shm/slackware-syncing
|
||||||
|
|
||||||
|
# are we still sync'ing from slackware.com?
|
||||||
|
if [ ! -r $file2 ]; then
|
||||||
|
touch $file2
|
||||||
|
echo "
|
||||||
|
NB! Slackware-current is syncing from slackware.com!
|
||||||
|
Started: `date`
|
||||||
|
" > /usit/ftp1/ftp/slackware/NB-SYNCING-FROM-SLACKWARE.COM
|
||||||
|
|
||||||
|
# loop until we get a free slot
|
||||||
|
status=1
|
||||||
|
while [ $status != 0 ]
|
||||||
|
do
|
||||||
|
/local/bin/rsync -av --delete-after --delay-updates --hard-links \
|
||||||
|
--links --stats \
|
||||||
|
--exclude=NB-SYNCING-FROM-SLACKWARE.COM \
|
||||||
|
--exclude=ls-lR* \
|
||||||
|
--exclude=.message \
|
||||||
|
--exclude=.bash_history \
|
||||||
|
--exclude=slackware-1.1.2 \
|
||||||
|
--exclude=slackware-2.0.1 \
|
||||||
|
--exclude=slackware-2.1 \
|
||||||
|
--exclude=slackware-2.2.0 \
|
||||||
|
--exclude=slackware-2.3 \
|
||||||
|
--exclude=slackware-3.0 \
|
||||||
|
--exclude=slackware-3.1 \
|
||||||
|
--exclude=slackware-3.3 \
|
||||||
|
--exclude=slackware-3.4 \
|
||||||
|
--exclude=slackware-3.5 \
|
||||||
|
--exclude=slackware-3.6 \
|
||||||
|
--exclude=slackware-3.9 \
|
||||||
|
--exclude=slackware-4.0 \
|
||||||
|
--exclude=slackware-7.0 \
|
||||||
|
--exclude=slackware-7.1 \
|
||||||
|
--exclude=slackware-8.0 \
|
||||||
|
--exclude=slackware-8.1 \
|
||||||
|
--exclude=slackware-9.0 \
|
||||||
|
--exclude=slackware-9.1 \
|
||||||
|
--exclude=slackware-iso \
|
||||||
|
rsync.osuosl.org::slackware /usit/ftp1/ftp/slackware/ >> $file 2>> $file
|
||||||
|
|
||||||
|
# not using 2>&1 | tee $file redirect because of $?
|
||||||
|
status=$?
|
||||||
|
if [ $status != 0 ]
|
||||||
|
then
|
||||||
|
echo "
|
||||||
|
`date`
|
||||||
|
Sleeping 5 min...
|
||||||
|
" >> $file
|
||||||
|
sleep 300
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# sync ISOs
|
||||||
|
# loop until we get a free slot
|
||||||
|
status=1
|
||||||
|
while [ $status != 0 ]
|
||||||
|
do
|
||||||
|
/local/bin/rsync -av --delete-after --delay-updates --hard-links \
|
||||||
|
--links --stats \
|
||||||
|
--exclude=slackware-current-iso \
|
||||||
|
--exclude=slackware-8.1-iso \
|
||||||
|
--exclude=slackware-9.0-iso \
|
||||||
|
--exclude=slackware-9.1-iso \
|
||||||
|
--exclude=slackware-10.0-iso \
|
||||||
|
--exclude=slackware-10.1-iso \
|
||||||
|
--exclude=slackware-10.2-iso \
|
||||||
|
--exclude=slackware-11.0-iso \
|
||||||
|
--exclude=slackware-12.0-iso \
|
||||||
|
--exclude=slackware-12.1-iso \
|
||||||
|
--exclude=slackware-12.2-iso \
|
||||||
|
--exclude=slackware-13.0-iso \
|
||||||
|
--exclude=slackware-13.1-iso \
|
||||||
|
--exclude=slackware-13.37-iso \
|
||||||
|
--exclude=slackware64-13.0-iso \
|
||||||
|
--exclude=slackware64-13.1-iso \
|
||||||
|
--exclude=slackware64-13.37-iso \
|
||||||
|
slackware-iso@ftp.osuosl.org::slackware-iso /usit/ftp1/ftp/slackware/slackware-iso/ >> $file 2>> $file
|
||||||
|
|
||||||
|
# not using 2>&1 | tee $file redirect because of $?
|
||||||
|
status=$?
|
||||||
|
if [ $status != 0 ]
|
||||||
|
then
|
||||||
|
echo "
|
||||||
|
`date`
|
||||||
|
Sleeping 5 min...
|
||||||
|
" >> $file
|
||||||
|
sleep 300
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
# Since I'm not redirecting to stdout, and I would like to recive status in
|
||||||
|
# my mail, I cat the newly created file
|
||||||
|
#cat $file
|
||||||
|
|
||||||
|
# not all files are readable from slackware.com (ISOs) to reduce load
|
||||||
|
chmod -R a+r /usit/ftp1/ftp/slackware/
|
||||||
|
|
||||||
|
# make index
|
||||||
|
cd /usit/ftp1/ftp/slackware/
|
||||||
|
ls -lR > ls-lR
|
||||||
|
gzip ls-lR -9 -c > ls-lR.gz
|
||||||
|
|
||||||
|
# cleaning up
|
||||||
|
rm /usit/ftp1/ftp/slackware/NB-SYNCING-FROM-SLACKWARE.COM
|
||||||
|
rm $file2
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user