File: Install-MacOS.command.in

package info (click to toggle)
freefem++ 3.61.1+dfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 17,108 kB
  • sloc: cpp: 141,214; ansic: 28,664; sh: 4,925; makefile: 3,142; fortran: 1,171; perl: 844; awk: 290; php: 199; pascal: 41; f90: 32
file content (50 lines) | stat: -rw-r--r-- 1,581 bytes parent folder | download | duplicates (5)
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
49
50
#!/bin/sh
appl=/Applications
cd `dirname $0`
echo "Installtion of Freefem++ " 
if [ -f OtherMacOsLib.tgz ]; then
for i in `tar ztf OtherMacOsLib.tgz`; do
 if [ ! -f "/$i" ]; then
  echo " the Libary '/$i' don't exist => install (need of admin password)"
   sudo  tar zxvf OtherMacOsLib.tgz -C / $i
  else
  echo " the Libary '/$i'  exist "
 fi
done 
#  verif .... 
for i in `tar ztf OtherMacOsLib.tgz`; do
  if [ ! -f "/$i" ]; then
    echo " the Libary '/$i' don't exist FreeFEM cannot run (call you adminisator sorry)"
    echo "Sorry"
    exit 1;
 fi
done
fi


echo " copy FreeFem++.app in "$appl" "
if [ -d FreeFem++.app ] ; then
  rsync -avHE --delete   FreeFem++.app/  "$appl"/FreeFem++.app
fi


lbin=`cd "$appl"/FreeFem++.app/Contents/bin/; echo *`
echo "  install $lbin    commands in /usr/local/bin (need of admin password)"

sudo mkdir -p  /usr/local/bin
sudo mkdir -p  `dirname @ff_prefix_dir@`
sudo ln -s  "$appl"/FreeFem++.app/Contents/bin/* /usr/local/bin
sudo rm /usr/local/bin/ff-c++
sudo sed <"$appl"/FreeFem++.app/Contents/bin/ff-c++ >/usr/local/bin/ff-c++ \
	-e 's;FFAPPLI_INC;$app/FreeFem++.app/Contents/include;' 
chmod a+rx /usr/local/bin/ff-c++
if [ -d "@ff_prefix_dir@" ] ; then
    echo Warning "@ff_prefix_dir@" is a dirctory keep this.
else
    sudo rm -f "@ff_prefix_dir@"
    sudo ln -s "$appl/FreeFem++.app/Contents" "@ff_prefix_dir@"
    echo link "@ff_prefix_dir@  ->  $appl/FreeFem++.app/Contents/ "
fi
echo "++  FreeFem++ is correctly install in $appl  directory."
echo " install in /usr/local/bin: $lbin "
echo " Thanks for  using  FreeFem++ v3 "