Loner
03-09-2002, 02:30 PM
I'm using Red Hat 7.3 with Gnome 1.4 which does not support Arabic. The new version, Gnome 2 supports Arabic.
I downloaded it a couple of months ago, a total of 60 files.
The steps for uncompressing and installing the Gnome2 files took a LONG time.
So I wrote this shell script to automate the process. If you have downloaded Gnome 2 files, can you please test this script and tell me if it works or not.
The shell script does NOT fix errors. If there are any errors, you have to fix them and then run the script again. The shell script continues from where it stopped last time; it does not restart from the beginning.
Save the scrip and call it: g2i
You can download Gnome2 from here:
http://ftp.gnome.org/pub/GNOME/2.0.1/releases/final/
Loner
==================================
#! /bin/bash
#
#This variable will be of type "gz" or "bz2"
#
EXT=$1
echo
echo " "`date`
echo
echo " Dark Star Creations"
echo
echo " Gnome2 Installation Script Ver 1.0"
echo
echo " This script must be run by the root user."
echo
echo " This script MUST be run from the directory"
echo " where the Gnome2 files are located."
echo
#
# Check if the script was called with correct number of parameters
#
if [ ! $# -eq 1 ]; then
echo
echo "Usage: g2i gz OR g2i bz2"
echo
exit
fi
#
# Now we uncompress and untar the Gnome2 files
#
if [ ! -f directories ]; then
echo
echo un-tar and uncompress Gnome2 files .......this will take time!
echo
if [ $EXT = "gz" ]; then
find . -name "*tar.gz" -exec tar zxvf {} \;
elif [ $EXT = "bz2" ]; then
find . -name "*tar.bz2" -exec tar jxvf {} \;
else
echo
echo "Usage: g2i gz OR g2i bz2"
echo
exit
fi
fi
#
# Create a file that contains all the directory names
#
if [ ! -f directories ]; then
touch directories
#
# Read directory names into "directoris" file
#
for names in `ls`
do
if [ -d $names ]; then
echo $names >> directories
fi
done
fi
#cat directories
counter=`cat directories | wc -l`
while [ $counter -gt 0 ]
do
#echo $counter
counter=`expr $counter - 1`
#
# Get the first directory name and cd into it
#
cd `head -1 directories`
#
# Build and install the package
#
./configure;make;make install
cd ..
#
# Delete directory that just been processed from "directories" file.
# i.e. delete the first line in the file.
#
temp=`head -1 directories`
sed /$temp/d directories > temp1
mv temp1 directories
# cat directories
done
echo
echo
echo " Peace out...."
echo
echo " caloner2002@yahoo.com"
echo
---------------------------------------------------------------------------#
I downloaded it a couple of months ago, a total of 60 files.
The steps for uncompressing and installing the Gnome2 files took a LONG time.
So I wrote this shell script to automate the process. If you have downloaded Gnome 2 files, can you please test this script and tell me if it works or not.
The shell script does NOT fix errors. If there are any errors, you have to fix them and then run the script again. The shell script continues from where it stopped last time; it does not restart from the beginning.
Save the scrip and call it: g2i
You can download Gnome2 from here:
http://ftp.gnome.org/pub/GNOME/2.0.1/releases/final/
Loner
==================================
#! /bin/bash
#
#This variable will be of type "gz" or "bz2"
#
EXT=$1
echo
echo " "`date`
echo
echo " Dark Star Creations"
echo
echo " Gnome2 Installation Script Ver 1.0"
echo
echo " This script must be run by the root user."
echo
echo " This script MUST be run from the directory"
echo " where the Gnome2 files are located."
echo
#
# Check if the script was called with correct number of parameters
#
if [ ! $# -eq 1 ]; then
echo
echo "Usage: g2i gz OR g2i bz2"
echo
exit
fi
#
# Now we uncompress and untar the Gnome2 files
#
if [ ! -f directories ]; then
echo
echo un-tar and uncompress Gnome2 files .......this will take time!
echo
if [ $EXT = "gz" ]; then
find . -name "*tar.gz" -exec tar zxvf {} \;
elif [ $EXT = "bz2" ]; then
find . -name "*tar.bz2" -exec tar jxvf {} \;
else
echo
echo "Usage: g2i gz OR g2i bz2"
echo
exit
fi
fi
#
# Create a file that contains all the directory names
#
if [ ! -f directories ]; then
touch directories
#
# Read directory names into "directoris" file
#
for names in `ls`
do
if [ -d $names ]; then
echo $names >> directories
fi
done
fi
#cat directories
counter=`cat directories | wc -l`
while [ $counter -gt 0 ]
do
#echo $counter
counter=`expr $counter - 1`
#
# Get the first directory name and cd into it
#
cd `head -1 directories`
#
# Build and install the package
#
./configure;make;make install
cd ..
#
# Delete directory that just been processed from "directories" file.
# i.e. delete the first line in the file.
#
temp=`head -1 directories`
sed /$temp/d directories > temp1
mv temp1 directories
# cat directories
done
echo
echo
echo " Peace out...."
echo
echo " caloner2002@yahoo.com"
echo
---------------------------------------------------------------------------#