-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaeascripts
More file actions
executable file
·49 lines (37 loc) · 1016 Bytes
/
aeascripts
File metadata and controls
executable file
·49 lines (37 loc) · 1016 Bytes
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/bash
REPOLOC=https://github.com/AEADataEditor/editor-scripts.git
BASHRC=$HOME/.bashrc
ALT=$HOME/.profile
SUBDIR=aea-scripts
echo "This will clone the AEA repo, and add it to your PATH"
echo " - Repo: $REPOLOC"
echo " - Install location: $HOME/bin/$SUBDIR"
if [[ -f $BASHRC ]]
then
echo " - Adding to $BASHRC"
elif [[ -f $ALT ]]
then
echo " - Adding to $ALT"
BASHRC=$ALT
else
echo " Did not find $BASHRC or $ALT - not adding"
fi
if [[ ! -d $HOME/bin ]]
then
echo " $HOME/bin not found - this will be created"
fi
echo "-------------------------------------------"
echo "| CHANGES WILL BE MADE TO YOUR |"
echo "| SYSTEM IF YOU CONTINUE!! |"
echo "-------------------------------------------"
echo "Hit enter to continue, CTRL-C to interrupt"
read
# clone
[[ -d $HOME/bin ]] || mkdir $HOME/bin
cd $HOME/bin
git clone $REPOLOC $SUBDIR
# adding to PATH
echo "# Added by aeascripts / Lars Vilhuber $(date)
export PATH=$HOME/bin/$SUBDIR:\$PATH
" >> $BASHRC
echo "Done"