-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathextract_install_folder.sh
More file actions
executable file
·40 lines (31 loc) · 1.01 KB
/
Copy pathextract_install_folder.sh
File metadata and controls
executable file
·40 lines (31 loc) · 1.01 KB
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
#!/bin/sh
TMPDIR=/tmp/ltspice
CURRDIR=$PWD
OUTDIR=$CURRDIR/ltspice-installation
WINEDIR=$TMPDIR/env
DATADIR=$TMPDIR/local
EXECUTABLE=LTspiceXVII.exe
echo "Creating tmp directories in $TMPDIR"
install -m755 -d $TMPDIR $WINEDIR $DATADIR
cd $TMPDIR
echo "Getting installation file from the website..."
echo "---------------------------------------------"
wget "http://ltspice.analog.com/software/LTspiceXVII.exe"
if [ $? -ne 0 ]; then
echo "Error fetching file."
rm -rf $TMPDIR
exit -1
fi
echo "Setting environment variables..."
export WINEPREFIX=$WINEDIR
export XDG_DATA_HOME=$DATADIR
echo "Starting Installation..."
echo "Please accept the Terms & Conditions, select 'both x86 & x64' and install to default location"
echo "---------------------------------------------------------------------------------------------"
wine LTspiceXVII.exe
echo "Extracting the relevant files..."
install -m755 -d $OUTDIR
mv $WINEDIR/drive_c/Program\ Files/LTC/LTspiceXVII/* $OUTDIR
echo "Cleaning up $TMPDIR..."
rm -rf $TMPDIR
exit 0