Commit 3a8d44e9 authored by Diman Maharjan's avatar Diman Maharjan
Browse files

installation files uploaded

parent d1e6f249
#!/bin/bash/
#Installing EPaath automatic
package="balpathmala"
packagetar="balpathmala.tar.gz"
#first of all lets download the EPaath tar file from "download.olenepal.org/EPaath.tar.gz
#if it already has been downloaded then the old one is deleted and the new one is again download
#install apache2 if not already installed
function install_apache2 {
pkg="apache2"
sudo chown $USER /var/lib/dpkg/lock
if dpkg --get-selections | grep -q "^$pkg[[:space:]]*install$" >/dev/null; then
echo
#echo "the packafe is installed"
else
sudo apt-get -y install $pkg
#echo "Successfully installed $pkg"
fi
}
install_apache2
#check if BalPaath has been downloaded
cd ~
if [ -f "$packagetar" ]; then
rm -f $packagetar
#echo "the file exists"
fi
if [ -f "$packagetar.tar.gz.sha1" ]; then
rm -f $packagetar.tar.gz.sha1
fi
if [ -d "/var/www/html/$package/" ]; then
#echo "here also it exists"
sudo rm -r /var/www/html/$package/
fi
if [ -f "/usr/share/applications/balpaath.desktop" ];then
#echo "yaha pani xa raixa"
sudo rm -f /usr/share/applications/balpaath.desktop
fi
echo " Downloading BalPaathmala...."
echo
wget -c http://download.olenepal.org/$packagetar
wget -c http://download.olenepal.org/$packagetar.sha1
sha1sum -c balpathmala.tar.gz.sha1
if [ $? == 0 ]; then
echo"The package is ready to be extracted."
tar -xzvf $packagetar
else
echo "The file is corrupted. Please download the genuine file."
echo "Thank You !!"
cd ~
rm -f $packagetar.sha1
rm -f $package
exit
fi
sudo mv $package /var/www/html
sudo chown -R www-data:www-data /var/www/html/$package
sudo chmod -R 755 /var/www/html/$package
#now adding desktop entries for $package
cd /usr/share/applications/
sudo chown $USER /usr/share/icons
sudo chown $USER /usr/share/applications
sudo cp /var/www/html/$package/images/favicon.png /usr/share/icons/
sudo cp /var/www/html/$package/balpathmala.desktop /usr/share/applications/
sudo chown root /usr/share/icons
sudo chown root /usr/share/applications
cd ~
rm -r $packagetar
rm -f $packagetar.sha1
echo "Installation Complete !! ...Restarting Apache Service."
echo
sudo systemctl restart apache2.service
echo "THank you for installing BalPaathMaalaa!! "
echo "Now you can go to the desktop and run BalPaathMaalaa.Enjoy !!"
echo
echo
exit
#!/bin/bash/
#Installing EPaath automatic
package="EPaath"
packagetar="EPaath.tar.gz"
#first of all lets download the EPaath tar file from "download.olenepal.org/EPaath.tar.gz
#if it already has been downloaded then the old one is deleted and the new one is again download
#install apache2 if not already installed
function install_apache2 {
pkg="apache2"
sudo chown $USER /var/lib/dpkg/lock
if dpkg --get-selections | grep -q "^$pkg[[:space:]]*install$" >/dev/null; then
echo
#echo "the packafe is installed"
else
sudo apt-get -y install $pkg
#echo "Successfully installed $pkg"
fi
}
install_apache2
#check if BalPaath has been downloaded
cd ~
if [ -f "$packagetar" ]; then
rm -f $packagetar
#echo "the file exists"
fi
if [ -f "$packagetar.tar.gz.sha1" ]; then
rm -f $packagetar.tar.gz.sha1
fi
if [ -d "/var/www/html/$package/" ]; then
#echo "here also it exists"
sudo rm -r /var/www/html/$package/
fi
if [ -f "/usr/share/applications/balpaath.desktop" ];then
#echo "yaha pani xa raixa"
sudo rm -f /usr/share/applications/balpaath.desktop
fi
echo " Downloading BalPaathmala...."
echo
wget -c http://download.olenepal.org/$packagetar
wget -c http://download.olenepal.org/$packagetar.sha1
sha1sum -c EPaath.tar.gz.sha1
if [ $? == 0 ]; then
echo"The package is ready to be extracted."
tar -xzvf $packagetar
else
echo "The file is corrupted. Please download the genuine file."
echo "Thank You !!"
cd ~
rm -f $packagetar.sha1
rm -f $packagetar
exit
fi
sudo mv $package /var/www/html
sudo chown -R www-data:www-data /var/www/html/$package
sudo chmod -R 755 /var/www/html/$package
#now adding desktop entries for $package
cd /usr/share/applications/
sudo chown $USER /usr/share/icons
sudo chown $USER /usr/share/applications
#update has to be donein the main package in the download site for generalizing using $package for the name of main iconsand .desktop files to be used
sudo cp /var/www/html/$package/images/logo.png /usr/share/icons/
sudo cp /var/www/html/$package/epaath.desktop /usr/share/applications/
sudo chown root /usr/share/icons
sudo chown root /usr/share/applications
#installng required fonts
echo "Now installing the necessary fonts......"
function install_fonts {
sudo mkdir /usr/share/fonts/epaath_fonts
cd /usr/share/fonts/epaath_fonts
sudo wget -c http://download.olenepal.org/fonts/mangal.ttf
sudo wget -c http://download.olenepal.org/fonts/mangal_0.ttf
sudo wget -c http://download.olenepal.org/fonts/Lohit_Hindi.ttf
sudo chown root:staff /usr/share/fonts/epaath_fonts -R
sudo chmod 644 /usr/share/fonts/epaath_fonts/* -R
sudo chmod 755 /usr/share/fonts/epaath_fonts
sudo fc-cache -fv
}
cd /usr/share/fonts/
if [ -d "epaath_fonts" ]; then
echo "the fonts are already installed"
else
install_fonts
fi
cd ~
rm -r $packagetar
rm -f $packagetar.sha1
echo "Installation Complete !! ...Restarting Apache Service."
echo
sudo systemctl restart apache2.service
echo "THank you for installing Epaath!! "
echo "Now you can go to the desktop and run Epaath.Enjoy !!"
echo
echo
exit
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment