[Çözüldü]Bir betik hazırladım hatalar nerde acaba?

Başlatan zeusmaster, 17 Kasım 2011 - 15:35:57

« önceki - sonraki »

0 Üyeler ve 1 Ziyaretçi konuyu incelemekte.

zeusmaster

#!/bin/sh
# <Debian Mint Ubuntu> da 'grafik yazı editörleri' için Kwrite, Kate, Gedit ile "aspell-tr yazım denetimi"
# Copyright (C) 2011 Yaşar Yeğin (Felâsife) <yasar @ imeyil.com> 
# doctus.org && debian.org.tr
#####This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
#####This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#####You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
if [ $USER != root ]; then
echo "Hata: betik yönetici haklarıyla (su ile) çalıştırılmalıdır.

bye"
sleep 0;
exit 0
fi
###
echo    "1. Kurmak mı istiyorsunuz?"
echo    "2. Kaldırmak mı istiyorsunuz?"
echo -n "Secenek giriniz : "
read secenek
case $secenek in
        ;;
        1)
echo " "
file="/tmp/octopus/bin/octopus"
if [ ! -e $file ]; then
echo "Kurulum devam ediyor.."
else
echo "Üzgünüz!
Daha önce kurulum yapmışsınız, önce kaldırmanız gerekmektedir."
sleep 0;
exit 0
fi
#######Önce klasörleri oluşturalaım
mkdir /tmp/octopus
mkdir /tmp/hazırlık
#######BLAS ı hazırlayıp kuralım Hazırlayalım
cd /tmp/hazırlık
mkdir blas
wget http://www.netlib.org/blas/blas.tgz
tar xvf blas.tgz
cd BLAS
make
mkdir /tmp/octopus/lib
cp blas_LINUX.a /tmp/octopus/lib/libblas.a

########LAPAC ı Hazırlayıp kuralım
cd /tmp/hazırlık
mkdir lapack
cd lapack
wget http://www.netlib.org/lapack/lapack.tgz
tar xvf lapack.tgz
cd lapack-3.3.1
cp make.inc.example make.inc
make lib
cp lapack_LINUX.a /tmp/octopus/lib/liblapack.a

#######GSL i hazırlanması ve kurulması
cd /tmp/hazırlık
mkdir gsl
cd gsl
wget ftp://ftp.gnu.org/gnu/gsl/gsl-1.15.tar.gz
tar xvf gsl-1.15.tar.gz
cd gsl-1.15
./configure  --prefix=/tmp/octopus --disable-shared --enable-static
make
make install

#######FFTW i hazırlayıp kuralım
cd /tmp/hazırlık
mkdir fftw
cd fftw
wget http://www.fftw.org/fftw-3.3.tar.gz
tar xvf fftw-3.3.tar.gz
cd fftw-3.3
./configure  --prefix=/tmp/octopus
make
make install

######LİBXC i hazırlatyıp kuralım
cd /tmp/hazırlık
mkdir libxc
cd libxc
wget http://www.tddft.org/programs/octopus/down.php?file=libxc/libxc-1.1.0.tar.gz
mv down* libxc-1.1.0.tar.gz
tar xvf libxc-1.1.0.tar.gz
cd libxc-1.1.0
./configure --prefix=/tmp/octopus
make
make install

######OCTOPUS kurulumu
cd /tmp/hazırlık
mkdir octopus
cd octopus
wget http://www.tddft.org/programs/octopus/down.php?file=4.0.0/octopus-4.0.0.tar.gz
mv dow* octopus-4.0.0.tar.gz
tar xvf octopus-4.0.0.tar.gz
cd octopus-4.0.0/
export LIBS_BLAS=/tmp/octopus/lib/libblas.a
export LIBS_LAPACK=/tmp/octopus/lib/liblapack.a
export LIBS_FFT=/tmp/octopus/lib/libfftw3.a
###
./configure  --prefix=/tmp/octopus --with-gsl-prefix=/tmp/octopus --with-libxc-prefix=/tmp/octopus
make
make install
#####Kurulum sonu kalanları temizleyelim....

####### Bunu sonraya bıraktım

echo " "
file="/tmp/octopus/bin/octopus"
if [ ! -e $file ]; then
echo "Kurulum bitti rahatla artık :)"
else
echo "Üzgünüz!
Biryerde bazı hatalar oldu bana ulaş :)"
;;
        2)
echo ""
file="/tmp/octopus/bin/octopus"
if [ -e $file  ]; then
echo "Kaldırma işlemi başladı.."
else
echo "Üzgünüz!
Betiği kurmadan kaldıramazsınız.."
sleep 0
exit 0
fi
#######Kaldırma başlasın
cd /tmp/
rm hazırlık
rm octopus

#######
echo "Kaldırma işlemi bitti..."
  ;;
        *)
          echo bye
esac


Up and Running...

alquirel

Çalışan halini ekliyorum

#!/bin/sh
# <Debian Mint Ubuntu> da 'grafik yazı editörleri' için Kwrite, Kate, Gedit ile "aspell-tr yazım denetimi"
# Copyright (C) 2011 Yaşar Yeğin (Felâsife) <yasar @ imeyil.com> 
# doctus.org && debian.org.tr
#####This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
#####This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#####You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
if [ $USER != root ]; then
echo "Hata: betik yönetici haklarıyla (su ile) çalıştırılmalıdır.

bye"
sleep 0;
exit 0
fi
###
echo    "1. Kurmak mı istiyorsunuz?"
echo    "2. Kaldırmak mı istiyorsunuz?"
echo -n "Secenek giriniz : "
read secenek
case $secenek in
        1)
    echo " "
    file="/tmp/octopus/bin/octopus"
    if [ ! -e $file ]; then
    echo "Kurulum devam ediyor.."
else
    echo "Üzgünüz!
Daha önce kurulum yapmışsınız, önce kaldırmanız gerekmektedir."
sleep 0;
exit 0
fi
#######Önce klasörleri oluşturalaım
mkdir /tmp/octopus
mkdir /tmp/hazırlık
#######BLAS ı hazırlayıp kuralım Hazırlayalım
cd /tmp/hazırlık
mkdir blas
wget http://www.netlib.org/blas/blas.tgz
tar xvf blas.tgz
cd BLAS
make
mkdir /tmp/octopus/lib
cp blas_LINUX.a /tmp/octopus/lib/libblas.a

########LAPAC ı Hazırlayıp kuralım
cd /tmp/hazırlık
mkdir lapack
cd lapack
wget http://www.netlib.org/lapack/lapack.tgz
tar xvf lapack.tgz
cd lapack-3.3.1
cp make.inc.example make.inc
make lib
cp lapack_LINUX.a /tmp/octopus/lib/liblapack.a

#######GSL i hazırlanması ve kurulması
cd /tmp/hazırlık
mkdir gsl
cd gsl
wget ftp://ftp.gnu.org/gnu/gsl/gsl-1.15.tar.gz
tar xvf gsl-1.15.tar.gz
cd gsl-1.15
./configure  --prefix=/tmp/octopus --disable-shared --enable-static
make
make install

#######FFTW i hazırlayıp kuralım
cd /tmp/hazırlık
mkdir fftw
cd fftw
wget http://www.fftw.org/fftw-3.3.tar.gz
tar xvf fftw-3.3.tar.gz
cd fftw-3.3
./configure  --prefix=/tmp/octopus
make
make install

######LİBXC i hazırlatyıp kuralım
cd /tmp/hazırlık
mkdir libxc
cd libxc
wget http://www.tddft.org/programs/octopus/down.php?file=libxc/libxc-1.1.0.tar.gz
mv down* libxc-1.1.0.tar.gz
tar xvf libxc-1.1.0.tar.gz
cd libxc-1.1.0
./configure --prefix=/tmp/octopus
make
make install

######OCTOPUS kurulumu
cd /tmp/hazırlık
mkdir octopus
cd octopus
wget http://www.tddft.org/programs/octopus/down.php?file=4.0.0/octopus-4.0.0.tar.gz
mv dow* octopus-4.0.0.tar.gz
tar xvf octopus-4.0.0.tar.gz
cd octopus-4.0.0/
export LIBS_BLAS=/tmp/octopus/lib/libblas.a
export LIBS_LAPACK=/tmp/octopus/lib/liblapack.a
export LIBS_FFT=/tmp/octopus/lib/libfftw3.a
###
./configure  --prefix=/tmp/octopus --with-gsl-prefix=/tmp/octopus --with-libxc-prefix=/tmp/octopus
make
make install
#####Kurulum sonu kalanları temizleyelim....

####### Bunu sonraya bıraktım

echo " "
    file="/tmp/octopus/bin/octopus"
    if [ ! -e $file ]; then
    echo "Kurulum bitti rahatla artık :)"
else
    echo "Üzgünüz!
Biryerde bazı hatalar oldu bana ulaş :)"
fi
    ;;
        2)
     echo ""
     file="/tmp/octopus/bin/octopus"
     if [ -e $file  ]; then
     echo "Kaldırma işlemi başladı.."
else
    echo "Üzgünüz!
Betiği kurmadan kaldıramazsınız.."
sleep 0
exit 0
fi
#######Kaldırma başlasın
cd /tmp/
rm hazırlık
rm octopus
   
#######
echo "Kaldırma işlemi bitti..."
      ;;
        *)
          echo bye
esac


case durumunu başlattıktan hemen sonra ;; (noktalı virgülleri) kullanmışsın, onları kaldırdım.
En sonda kullandığın if bloğunu fi ile sonlandırmamışsın, fi ekledim.

zeusmaster

Hocam çokm saolasın ellerin dert görmesin  :) :)
Up and Running...