安裝軟體的路徑錯誤 - Linux

Hedy avatar
By Hedy
at 2014-01-23T00:17

Table of Contents


抱歉我重新整理發問

我要安裝一個叫talys的軟體

README裡面寫到
https://www.dropbox.com/s/k04n9m5y61c3i75/README

talys.setup
https://www.dropbox.com/s/ardxgrm4w1q30am/talys.setup


我把talys的資料夾放在
/home/lee/physics/talys
https://www.dropbox.com/s/oto32ia0csc9g94/%202014-01-23-2.png

但我應該是在

3. machine這邊有打錯?

所以有structure data base not installed的錯誤

想請教該怎麼打

我把 talysdir 換成/home/lee/physics/talys
應該沒錯吧?

https://www.dropbox.com/s/7e79nheif81vavb/2014-01-23.png




#!/bin/sh
unalias -a
#
# This script takes care of the TALYS installation.
# All you have to do is adapt the next variables to your own situation,
# and run.....
#
#compiler='lf95 --staticlink'
compiler='g95'
Thome=${/home/lee/physics/talys}
bindir=$Thome'/home/lee/physics/talys/bin' # destiny directory of the TALYS
executable
#
# From here on, the rest should work automatically
#
# 1. Define the talys directory
#
talysdir=`pwd`
#
# 2. Ensure that all directories have execute permission and that
# all files have a read and write permission
#
cd ..
chmod -R u+rwX talys
#
# 3. Ensure that TALYS can read the structure database by replacing
# the path name in subroutine machine.f
#
datapath=${talysdir}'/'
datapathnew=`echo $datapath | sed 's/\//\\\\\//g'`
cd ${talysdir}'/source/'
sed "s/ home='.*'/ home='${datapathnew}'/" machine.f > machine_tmp.f
mv -f machine_tmp.f machine.f
#
# 4. Compile TALYS.
# Please note that the compilation of ecis06t.f
# may result in some trivial warning messages
#
${compiler} -c *.f
${compiler} *.o -o talys
#
# 5. Check whether the setup procedure has been successful
#
if [ -e talys ]
then
mv -f talys ${bindir}/talys
echo ' '
echo 'The TALYS setup has been completed.'
echo ' '
echo 'You will find a talys executable in your' $bindir 'directory.'
echo ' '
echo 'You are all set to run the sample problems in the samples directory'
echo 'with the verify script.'
else
echo 'TALYS setup failed'
fi

--
Tags: Linux

All Comments

shell script 變數問題

Zanna avatar
By Zanna
at 2014-01-22T22:20
當有變數存在時 TMP${q}=something只能被當作是一般字串 而非命令 你可以試著這樣操作 並檢驗它的執行過程 echo and#34;---- start ----and#34; x=123 foo${x}bar=foobar echo and#34;${foo123bar}and#34; e ...

關於Cloud Service的選擇

Oliver avatar
By Oliver
at 2014-01-22T22:20
大家好 Linux板首PO 請多多指教~ 不知道有沒有發錯板 有的話請指正 感謝 是這樣的 我目前有一個專案 是開發一個網上購物平台 我們用Wordpress + Woocommerce 實現這個功能 開發接近完成 現在已經上線進行內部測試 跟組員還有公司討論了未來會實現的網站結構 最終的結構應該 ...

用shellscript發信的問題

Ursula avatar
By Ursula
at 2014-01-22T21:44
各位好,我也是位linux的新手 本來有一個發送信件的函數寫這樣: function mail2op { scp -q ./checkresults/$MAILFILE $MAILSRVIP:/tmp/$MAILFILE ssh $MAILSRVIP and#34;mail $EMAIL -s \and#3 ...

shell script 變數問題

Erin avatar
By Erin
at 2014-01-22T20:03
想請教一下為何下列第二和第三種方法會顯示錯誤訊息 1. TMP1=/root/zh/pp/pg1.tmp TMP2=/root/zh/pp/pg2.tmp 2. q=1 while [ and#34;$qand#34; -le and#34;4and#34; ];do TMP${q}=/root/ ...

lf95 not found

Annie avatar
By Annie
at 2014-01-22T13:17
我要安裝一個叫talys的軟體 README裡面寫到 https://www.dropbox.com/s/k04n9m5y61c3i75/README talys.setup https://www.dropbox.com/s/ardxgrm4w1q30am/talys.setup #compiler ...