Register
It is currently Wed Jul 23, 2014 10:21 pm

slik.sh - (SL)ax (I)so (K)reator ----- unfinished


All times are UTC - 6 hours


Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Mon Jul 03, 2006 8:45 am   
Site Admin
User avatar

Joined: Sun May 15, 2005 9:36 pm
Posts: 662
Location: Des Moines, Iowa
Coastie.. after reading your program and notes.... i thought you might be interested in this program..... I started this... well, remember when you finally got me to build my first iso ;) Right after that...... I never completed the program, but I have alot of the basics in there. I thought I'd repost it for you..... and feel free to use any/all of it however you want too. The program is NOT completed .... and there are functions shown that aren't finished, or possibly not used yet. It is very much a work in progress, I just stopped working on it, and remembered it after you posted here and on the lug..... took me awhile to find it ;)

Code:

#!/bin/bash
#
##########################
# USA Linux Users Group  #
# http://www.usalug.org  #
# http://bashscripts.org #
##########################
#
#####################################################################
#
# FILE: slik.sh - (SL)ax (I)so (K)reator
# AUTHOR: Dave Crouse
# VERSION: 5.1.6
# REVISED DATE: 05-23-2006
#
# Description: Helps to create a custom version of SLAX
#           through automated scripts. Must be run as ROOT.
#   
#####################################################################

# Yeah..... it ain't even CLOSE to being done...so get over it ;P

#### USER CONFIG -- if necc. change the variables below
# use "cdrecord -scanbus" it shows you what the (x,y,z) number of your cdr is
# if scsi you might try using k3b to determine the settings for the cdr drive
# cdrecord ${mycdburner} -v mynew.iso
mycdburner="dev=0,2,0"


#####################################################################
#
# VARIABLES THAT CHANGE WITH EACH RELEASE
#

baseftpurl="ftp://ftp.slax.org/"

currentslax="ftp://ftp.slax.org/SLAX-5.x/slax-5.1.6.iso"
currentslaxmd5sum="f0c21fb7ede65cee6dc114099ceefa74" #slax-5.1.6.iso

currentfrodo="ftp://ftp.slax.org/SLAX-5.x/special-editions/slax-frodo-5.1.6.iso"
currentfrodomd5sum="1f5c3a4418a0cf46a6ccce2b10e06684" #slax-frodo-5.1.6.iso

currentkillbill="ftp://ftp.slax.org/SLAX-5.x/special-editions/slax-killbill-5.1.6.iso"
currentkillbillmd5sum="e5e6fd8b2343e14b26b11e839621285c" #slax-killbill-5.1.6.iso

currentpopcorn="ftp://ftp.slax.org/SLAX-5.x/special-editions/slax-popcorn-5.1.6.iso"
currentpopcornmd5sum="be49a87cd0cdbb5700fd70e257de198c" #slax-popcorn-5.1.6.iso

currentserver="ftp://ftp.slax.org/SLAX-5.x/special-editions/slax-server-5.1.6.iso"
currentservermd5sum="f3a924f415177879c3d20c69c56cc2f0" #slax-server-5.1.6.iso

currentmoduleurl="ftp://ftp.slax.org/SLAX-5-modules/"
modulesmd5sums="ftp://ftp.slax.org/SLAX-5-modules/md5.txt"

#
# END OF VARIABLES THAT CHANGE
#
#####################################################################


checkforroot ()
{
ROOT_UID=0
if [ "$UID" -ne "$ROOT_UID" ]
then
echo ""
echo "**************** ERROR !! **************"
echo "You must be logged in as root to run this script"
echo "Please log in as root and re-run this script."
echo "**************** ERROR !! **************"
echo ""
exit
fi
} # working

setupdirs ()
{
cd /
mkdir -p SLAX
cd SLAX
mkdir -p .CURRENTMOUNTEDISO # Where you mount the iso you want to copy
mkdir -p CURRENTEXTRACTED # Where the iso is copied too for modifying
mkdir -p .isos # Where your downloaded iso files go
mkdir -p ISOs # Where your newly created iso's are stored
}

cleanupdirs ()
{
rm -Rf /SLAX/CURRENTEXTRACTED
rm -Rf /SLAX/.CURRENTMOUNTEDISO
} # working

mountiso ()
{
cd .isos;
clear; ls -s1h
read -p "Please choose one of the options above : " chooseiso
mount -o rw,loop=/dev/loop0 ${chooseiso} /SLAX/.CURRENTMOUNTEDISO
cd ..
} # working

unmountiso ()
{
umount -o rw,loop=/dev/loop0 ${chooseiso} /SLAX/.CURRENTMOUNTEDISO
} # working

copyiso ()
{
cd .CURRENTMOUNTEDISO
cp -a * ../CURRENTEXTRACTED
cd ..
} # working

wgetallmo ()
{
cd /SLAX
wget -nH -r ftp://ftp.slax.org/SLAX-5-modules/
} # working

distrosize ()
{
du -s /SLAX/CURRENTEXTRACTED
} #working



wgetamo ()
{
wget ftp://ftp.slax.org/SLAX-5-modules/SPECFICFILEHERE
}

wgetisofile ()
{
wget ftp://ftp.slax.org/SLAXISOoneOFthreeCHOICES
}

md5sumcheckiso ()
{
md5sum NAMEOFISOFILEHERE
DO COMPARISON HERE
}

createnewiso ()
{
cd CURRENTEXTRACTED;
./make_iso.sh /tmp/new-slax.iso
read -p "What would you like to name your iso file? (leave off the .iso) : " nameofiso
mv /tmp/new-slax.iso /SLAX/ISOs/${nameofiso}.iso
cd ..
}

burnisofile ()
{
commandstoburnisofilehere
# cdrecord dev=0,2,0 -v mynew.iso
# cdrecord ${mycdburner} -v mynew.iso
}

updateCAST ()
{
routine to update the current CAST program IE:a configfile
}

includepersonalfiles ()
{
echo ""
}

copymotomodule ()
{
cp MOfile /SLAX/CURRENTEXTRACTED/modules/
}

copytooptional ()
{
cp MOfile /SLAX/CURRENTEXTRACTED/optional/
}

mainmenu ()
{

1. Iso Menu # Download iso's here
2. mo Menu # Dowload mo files and add to new iso
3. Modified Iso Menu # Burn new iso from here
4. Add personal files
5.
6.
7.
8. Instructions/HELP
0. EXIT

}

isomenu ()
{
1. View available iso files
2. Download current slax iso.
3. Download current killbill iso.
4. Download current popcorn iso.
5. Download current server iso.
6. Download current frodo iso.
7. Download all 5 isos.
8. Remove all current iso files.
9. Choose ISO to modify
0. EXIT
}

modulesmenu ()
{
1. View ALL available modules
2. Download ALL available modules
3. ADD module to new iso
4. REMOVE module from new iso

0. EXIT
}

modifiedisomenu ()
{
1. Size of modified directory
2. Create iso from modified directory
3. Burn newly created iso
4. List finished modified isos
5. Remove a modified iso.
6. Remove ALL modified iso.
0. EXIT
}

addpersonalfilesmenu ()
{
echo ""
}

####### START PROGRAM RUN HERE #########
checkforroot
setupdirs
wgetallmo
exit



Top
 Profile WWW  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP