topic title: Any one interested in a upgrade and install script
3 posts
• Page 1 of 1
-
Posts: 1,062
- Joined: 20 Jan 2010
#1
I have made a Upgrade and install script for easily setting up my computers if I ever mess up really bad while playing with the run scripts. I have lost parts of my some system files and the graphical interface purposely to test it. Ran the script and it would set it all back in working order. If any one is interested the code is now posted below
Last edited by Dave on 01 Feb 2010, 02:34, edited 1 time in total.
-
Posts: 1,520
- Joined: 07 Oct 2007
#2
Hey Dewy!
Go ahead and post your script hear for a look. You can use bbcode to display it.
code paste-text-hear /code
Enclose the word"code" and"/code in [ ] and it will display like this:
This way is can be recognized, examined, raked over, heckled and criticized. Maybe even used.
Go ahead and post your script hear for a look. You can use bbcode to display it.
code paste-text-hear /code
Enclose the word"code" and"/code in [ ] and it will display like this:
Code: Select all
paste-text-hear
-
Posts: 1,062
- Joined: 20 Jan 2010
#3
Here is code #1
Here is code #2
Code: Select all
#!/bin/bash
# Outputs in color, then resets color
function echo_c () {
echo -ne"\e[33m"
echo $1 $2
echo -ne"\e[0m"
}
# -------------------------------------------------------------------------------------- #
# INTRODUCTION
if [ $UID -ne 0 ]; then
echo_c"Please run this script as root."
echo_c"If you want a stable (recomended), testing or unstable make sure your /etc/apt/sources.list complies with your that"
echo_c"For differances and to find what you would like better visit http://www.debian.org/releases/"
echo_c"Also add these to your /etc/apt/sources.list"
echo_c"deb http://wine.sourceforge.net/apt/ binary/"
echo_c"deb http://www.backports.org/debian/ lenny-backports main"
su
fi
HOMECHECK=$(pwd | cut -d/ -f2)
if [ $HOMECHECK ="home" ]; then
USERNAME=$(pwd | cut -d/ -f3)
else
echo_c"Enter your username:"
read USERNAME
fi
XIN=/home/$USERNAME
echo_c"Davids upgrade script for building computers! READ CAREFULLY $USERNAME!"
echo_c""
echo_c"Make sure you added these to the /etc/apt/sources.list"
echo_c"deb http://wine.sourceforge.net/apt/ binary/"
echo_c"deb http://www.backports.org/debian/ lenny-backports main"
echo_c""
echo_c"This will do the following;"
echo_c""
echo_c"Upgrade;"
echo_c" -> All system components"
echo_c" -> Kernel distribution"
echo_c""
echo_c"Install;"
echo_c" -> Wine"
echo_c" -> Cabextract"
echo_c" -> Search Monkey"
echo_c" -> VLC Media Player"
echo_c" -> Wbar"
echo_c" -> Wbar Configuration Manager"
echo_c" -> Latest IES-4-Linux dependencies"
echo_c""
echo_c"Keep ocasional watch as this will automatically run, but ocasionally needs input during procedure"
echo_c""
echo_c -n"Are you sure you want to do this, $USERNAME ? [yes|no]"
read INPUT
if ["$INPUT" ="no" ]
then
echo_c"Job cancelled."
exit
else
echo_c"Continuing with the opperation"
echo_c"mepis-init is being removed to allow the rest of the install"
cp /etc/rc.local /etc/rc.local.old
cp /etc/default/rcS /etc/default/rcS.old
cp /etc/init.d/sendsigs /etc/init.d/sendsigs.old
cp /etc/kernel-img.conf /etc/kernel-img.conf.old
cp /usr/sbin/buildxconfig /usr/sbin/buildxconfig.bak
cp /usr/sbin/buildfstab /usr/sbin/buildfstab.bak
cp /usr/sbin/scanpartitions /usr/sbin/scanpartitions.bak
cp /boot/grub/message /boot
cp /etc/network/interfaces /etc/network/interfaces.old
apt-get purge mepis-init -y -qq
mv /etc/rc.local.old /etc/rc.local
mv /etc/default/rcS.old /etc/default/rcS
mv /etc/init.d/sendsigs.old /etc/init.d/sendsigs
mv /etc/kernel-img.conf.old /etc/kernel-img.conf
mv /usr/sbin/buildxconfig.bak /usr/sbin/buildxconfig
mv /usr/sbin/buildfstab.bak /usr/sbin/buildfstab
mv /usr/sbin/scanpartitions.bak /usr/sbin/scanpartitions
echo_c""
echo_c"checking/updating system sources list"
apt-get -f install
apt-get -f autoremove
apt-get -f clean
apt-get -f update
echo_c""
echo_c"Upgrading all system components"
apt-get -f upgrade
apt-get -f install
apt-get -f autoremove
apt-get -f clean
echo_c""
echo_c"Upgrading kernel distribution"
apt-get -f dist-upgrade
apt-get -f install
apt-get -f autoremove
apt-get -f clean
echo_c""
echo_c"Checking for missed upgrades"
apt-get -f install
apt-get -f autoremove
apt-get -f check
echo_c""
echo_c"system completely up to date reboot when done procedure / able."
fi
echo_c -n"There may be unfinished dependencies, if so attempt to fix? [yes|no]"
read INPUT
if ["$INPUT" ="yes" ]
then
echo_c"Attempting to fix dependencies and continuing with install"
echo_c""
echo_c"checking/updating system sources list"
apt-get -f install
apt-get -f autoremove
apt-get -f clean
apt-get -f update
echo_c""
echo_c"Upgrading all system components"
apt-get -f upgrade
apt-get -f install
apt-get -f autoremove
apt-get -f clean
echo_c""
echo_c"Upgrading kernel distribution"
apt-get -f dist-upgrade
apt-get -f install
apt-get -f autoremove
apt-get -f clean
echo_c""
echo_c"Checking for missed upgrades"
apt-get -f install
apt-get -f autoremove
apt-get -f check
echo_c""
echo_c"system completely up to date reboot when done procedure / able."
fi
else
echo_c""
echo_c"Installing wine."
apt-get -f install wine
apt-get -f autoremove
apt-get -f clean
echo_c""
echo_c"Installing cabextract."
apt-get -f install cabextract
apt-get autoremove
apt-get clean
echo_c""
echo_c"Installing Search Monkey."
apt-get -f install searchmonkey
apt-get autoremove
apt-get clean
echo_c""
echo_c"Installing VLC Media Player."
apt-get -f install vlc
apt-get -f install mozilla-plugin-vlc
apt-get -f install
apt-get autoremove
apt-get clean
echo_c""
echo_c"Installing Wbar."
wget http://wbar.googlecode.com/files/wbar_1.3.3_i386.deb
apt-get -f install wbar
apt-get autoremove
apt-get clean
echo_c""
echo_c"Installing Wbar Configuration Manager."
wget http://www.ihku.biz/wbarconf/wbarconf_0.7.2-1_i386.deb
apt-get -f install wbarconf
apt-get autoremove
apt-get clean
echo_c""
echo_c"Installing dependencies for the latest IES-4-Linux."
echo_c"To install IES-4-Linux run upgrade_program2.sh as $USERNAME"
apt-get -f install libxxf86dga1 libxxf86vm1
echo_c""
echo_c"Checking for missed installs"
apt-get -f install
apt-get -f autoremove
apt-get -f check
echo_c""
echo_c"All addon packages have been installed if errors ocurred check /etc/apt/sources.list."
fi
echo_c -n"There may be unfinished dependencies, if so attempt to fix? [yes|no]"
read INPUT
if ["$INPUT" ="yes" ]
then
echo_c"Attempting to fix dependencies and continuing with install"
echo_c""
echo_c"checking/updating system sources list"
apt-get -f install
apt-get -f autoremove
apt-get -f clean
apt-get -f update
echo_c""
echo_c"Upgrading all system components"
apt-get -f upgrade
apt-get -f install
apt-get -f autoremove
apt-get -f clean
echo_c""
echo_c"Upgrading kernel distribution"
apt-get -f dist-upgrade
apt-get -f install
apt-get -f autoremove
apt-get -f clean
echo_c""
echo_c"Checking for missed upgrades"
apt-get -f install
apt-get -f autoremove
apt-get -f check
echo_c""
echo_c"system completely up to date reboot when done procedure / able."
echo_c"If there are still upgradeable packages then it may have to do with your sources or dependencies being held back"
fi
else
echo_c""
echo_c"Checking for missed installs"
apt-get -f install
apt-get -f upgrade
apt-get -f install
apt-get -f autoremove
apt-get -f check
echo_c""
echo_c"Finishing installs"
apt-get -f install
apt-get -f autoremove
apt-get -f check
fi
echo_c -n"!#! REMEMBER !#! If you would like to install IES-4-Linux run upgrade_program2.sh when this is finished. This will run the procedure of getting and installing IES-4-Linux, but make sure you run it as $USERNAME [OK]"
echo_c
read INPUT
if ["$INPUT" ="ok" ]
then
echo_c""
echo_c"Installing the latest stable version of window manager icewm"
apt-get -f install icewm-common/stable
apt-get autoremove
apt-get -f install icewm/stable
apt-get autoremove
apt-get clean
echo_c""
echo_c"Finishing install procedure"
apt-get -f install
apt-get autoremove
apt-get clean
else
echo_c""
echo_c"Installing the latest stable version of window manager icewm"
apt-get -f install icewm-common/stable
apt-get autoremove
apt-get -f install icewm/stable
apt-get autoremove
apt-get clean
echo_c""
echo_c"Finishing install procedure"
apt-get -f install
apt-get autoremove
apt-get clean
fi
echo_c"Finished. Your antiX is now ready"
killall roxterm
# -------------------------------------------------------------------------------------- #
# -------------------------------------------------------------------------------------- #
Code: Select all
#!/bin/bash
# Outputs in color, then resets color
function echo_c () {
echo -ne"\e[33m"
echo $1 $2
echo -ne"\e[0m"
}
# -------------------------------------------------------------------------------------- #
echo_c""
echo_c"Retrieving IES-4-Linux"
wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
echo_c""
echo_c"Unpacking IES-4-Linux"
tar zxvf ies4linux-latest.tar.gz
echo_c""
echo_c"Moving to folder containing IES-4-Linux"
cd ies4linux-2.9.9-1
echo_c""
echo_c"Running install for IES-4-Linux, input will be required"
./ies4linux