-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig
executable file
·79 lines (68 loc) · 1.75 KB
/
config
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
DIR="$HOME/.dragon_12"
source ./dragon_12_vars_config.sh
if [ ! -d $HOME/.dragon_12 ]
then
mkdir $DIR
fi
if [ ! -f $HOME/.dragon_12/dragon_12.sh ]&&[ ! -f $HOME/.dragon_12/dragon_12_vars_config.sh ]
then
echo 'Hard linking files to program local directory.'
chmod 755 dragon_12.sh
chmod 644 dragon_12_vars_config.sh
ln dragon_12.sh $DIR
cp dragon_12_vars_config.sh $DIR
fi
if [ "$1" == 'all' ]
then
if [ -z "$( grep dragon_12 $HOME/.bashrc )" ]
then
echo 'Adding environment variables to .bashrc.'
echo 'PATH=$PATH:$HOME/.dragon_12' >> $HOME/.bashrc
echo 'source $HOME/.dragon_12/dragon_12_vars_config.sh' >> $HOME/.bashrc
else
echo 'Dragon 12 shell tool is already configured'
fi
if [ -f assembler.zip ]
then
unzip assembler.zip
mv H* $DIR
mv s* $DIR
fi
fi
if [ ! -d $DRAGON_AS12_PATH/ ]
then
mkdir $DRAGON_AS12_PATH/
fi
if [ ! -f $DRAGON_AS12_PATH/$DRAGON_AS ]
then
cd $DRAGON_AS12_PATH/
wget 'http://dankohn.info/projects/68HC11/AsmIDE/asmide340.zip'
if [ -f asmide340.zip ]
then
unzip asmide340.zip
rm asmide340.zip
cd -
if [ "$( md5sum $DRAGON_AS12_PATH/$DRAGON_AS | cut --delimiter=' ' -f 1 )" == '620981d0329aaae115dadb5203356e5b' ]
then
echo 'as12.exe installed in'" $DRAGON_AS12_PATH"
else
:
fi
else
echo -e "Error \x27http://dankohn.info/projects/68HC11/AsmIDE/asmide340.zip\x27 not found" >&2
fi
fi
if [ -d $DRAGON_SIMULATOR_PATH/ ]
then
:
else
mkdir -p $DRAGON_SIMULATOR_PATH/
fi
until [ -f $DRAGON_SIMULATOR_PATH/$DRAGON_SIMULATOR ]
do
read -p "
Place the Micro.jar simulator file in $DRAGON_SIMULATOR_PATH and press [ENTER]: "
done
echo 'Config finished.'
exit 0