-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmkcommand
executable file
·48 lines (44 loc) · 1.12 KB
/
mkcommand
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/tcsh
# Check version
if ( $?gdvroot ) then
if ( ! $?gau ) then
set gau = 'gdv'
endif
if ( ! $?gauroot ) then
set gauroot = "${gdvroot}"
endif
else if ( $?g09root ) then
if ( ! $?gau ) then
set gau = 'g09'
endif
if ( ! $?gauroot ) then
set gauroot = "${g09root}"
endif
else if ( $?g16root ) then
if ( ! $?gau ) then
set gau = 'g16'
endif
if ( ! $?gauroot ) then
set gauroot = "${g16root}"
endif
else
echo "ERROR: Gaussian environment undefined in mkcommand"
exit 1
endif
# Check the existence of the Gaussian directories
if ( ! -d "${gauroot}" ) then
echo "ERROR: Invalid Gaussian directory ${gauroot} in mkcommand"
exit 1
else if ( ! -d "${gauroot}/${gau}" ) then
echo "ERROR: No ${gau} folder in ${gauroot} in mkcommand"
exit 1
endif
# Source the login file
if ( ! -f "${gauroot}/${gau}/bsd/${gau}.login" ) then
echo "ERROR: Gaussian ${gau}.login file not found in mkcommand"
exit 1
endif
source "${gauroot}/${gau}/bsd/${gau}.login"
# Extract the mk command
alias mk > "mkgau.tmp"
exit 0