-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_mbp2020.sh
executable file
·44 lines (36 loc) · 1.1 KB
/
install_mbp2020.sh
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
#!/usr/bin/env bash
# Check to see if the bash profiles already exist. If they do, archvie them
# into _bck files unless they are just symbolic links, in which case just
# remove the old links.
DAT=`date -u +%s`
filelist='zshrc gitignore_global'
for flnm in $filelist
do
if [ -L $HOME/.$flnm ]; then
echo "Found existing $flnm as a link..."
echo " Removing $flnm symbolic link..."
rm -v $HOME/.$flnm
fi
if [ -e $HOME/.$flnm ]; then
echo "Found existing $flnm as a file..."
echo " Making $flnm bck file..."
mv -v $HOME/.$flnm $HOME/.${flnm}_bck_${DAT}
fi
done
# uncomment this for Clojure
#mkdir -p $HOME/.lein
#cp lein/profiles.clj $HOME/.lein/profiles.clj
# Julia
sudo ln -s /Applications/Julia-1.6.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia
echo "Copying files..."
for flnm in $filelist
do
cp -v `pwd`/$flnm $HOME/.$flnm
done
cp -v `pwd`/zshrc_mbp2020 $HOME/.zshrc_local
echo " "
# be careful with this since it will over-write a token you can't look at on
# GitHub.
#cp gitconfig ~/.gitconfig
#echo "You need to update the token in your ~/.gitconfig"
echo "Done."