Results 1 to 1 of 1
I'm trying to make a linux-installer script. Well, actually I'm trying to make a linux installer, installer script...er if you get what I mean. I've written a script that uses ...
- 08-31-2007 #1Just Joined!
- Join Date
- Aug 2007
- Posts
- 1
Scripting help! Help a newbie and help a country!
I'm trying to make a linux-installer script. Well, actually I'm trying to make a linux installer, installer script...er if you get what I mean.
I've written a script that uses aptoncd and makeself.sh to bundle together programs and all their dependancies into one self-executing gzip file. It's really cool and it works great!
However, I would like to make a script that makes it really easy to create this gunzip file in the first place. You see this project has been for the 3rd world country of Laos. Internet here sux and a different way of distributing software is needed.
These self extracing gzip files will work great but they're a little too complicated for someone uneducated, and who doesn't speak english to create, so I started writing a "wizard" to automate the process......and quicky realised i was out of my league!
(I've only been BAS scripting for 2 weeks!) Anyway..here's where I'm up to, can you guys help me fill in the gaps?
-------------------
#!/bin/bash
# MAKE AN INSTALL SCRIPT SCRIPT
# Hamish's convert's deb files to self extracting gz files.
# bundles the desired deb and all it's dependancies together.
gksudo -k /bin/echo "login der"
sudo mkdir /tmp/setupfiles
sudo rm -f /var/cache/apt/archives/*.deb
sudo
yes | sudo apt-get update
zenity --info \
--text="Please choose the packages to include in your setup file"
sudo synaptic
#### HELP!! Up to this point, it's all going swimingly But I now need some way to create a metapagkage that is dependant on all the files now in /var/cache/apt/archives
sudo mv -f /var/cache/apt/archives/*.deb /tmp/setupfiles/Packages
#### HELP!! Now I need to create a local apt repository
#Copy sources.list with only /tmp/setup as local repository
# /tmp/setup is where finished installer will uncompress the
# repository to.
sudo cp sources.list /tmp/setupfiles/sources.list
#copy the setup script
sudo cp ~/installerconverter/install.setup /tmp/setupfiles/install.setup
#Use makeself.sh to bundle everything together
Makeself.sh..blah blah
-------------------------------------------------
Here's a copy of the install script if anyone wants to use it...(It's rough but it works)
#!/bin/bash
# Hamish's setup script
gksudo -k /bin/echo "login der"
sudo mkdir /tmp/setup
sudo cp -r *.* /tmp/setup
sudo cp -r ./packages -d /tmp/setup/
# cd /tmp/setup
# sudo dpkg-scanpackages ./dev/null | sudo gzip -9c > /tmp/setup/Packages.gz
sudo mv -f /etc/apt/sources.list /etc/apt/sources.list.bak
sudo mv -f /etc/apt/sources.list.d /etc/apt/sources.list.d.bak
sudo cp sources.list -t /etc/apt/
# sudo yes | sudo apt-cdrom add /dev/cdrom
sudo apt-get update
yes | sudo apt-get install aptoncd-metapackage
sudo mv -f /etc/apt/sources.list.bak /etc/apt/sources.list
sudo mv -f /etc/apt/sources.list.d.bak /etc/apt/sources.list.d
zenity --info \
--text="Setup Completed. You can now run the program from the applications menu"
exit 1
fi


Reply With Quote