-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
75 lines (55 loc) · 2.13 KB
/
install.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
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
if [ -f ~/dotfiles/DotfilesLog.txt ]
then
rm ~/dotfiles/DotfilesLog.txt
fi
function Log_Writer () {
printf "$(date +%Y-%m-%d_%H:%M:%N): $1 \n" >> ~/dotfiles/DotfilesLog.txt
}
Log_Writer "Start of Script File"
Log_Writer "DOGVAR = $DOGVAR"
## Update to the latest PowerShell
# powershell is included - no need to install - an option
#curl -sSL https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh | bash
## update PWSH profile and powerline fonts and modules for command prompt- installing modules needed
# posh-git, oh-my-posh, PSReadLine
#jv:
#pwsh ~/dotfiles/cmdprmt.ps1
#tr:
pwsh ~/dotfiles/powerlineinstaller.ps1
#Setup for Startup powerdshell - profile
#jv:
#mkdir -p ~/.config/powershell/ && cp ~/dotfiles/myprofile.ps1 ~/.config/powershell/Microsoft.PowerShell_profile.ps1
#tr:
mkdir -p ~/.config/powershell/ && cp ~/dotfiles/mypwshprofile.ps1 ~/.config/powershell/Microsoft.PowerShell_profile.ps1
Log_Writer "Powershell install, profile and command prompt complete"
Log_Writer "Start of bash powerline"
cd ~
#use the apt installer, no apt update required--unless needed for optional go version
apt-get install golang-go --assume-yes
Log_Writer "Install Go Complete"
# export GOROOT=/usr/local/go
# export GOPATH=$HOME/go
# #jv:
# _GOPATH=$(go env GOPATH)
# _GOROOT=$(go env GOROOT)
# echo 'export GOROOT=$_GOROOT' >>/root/.bashrc
# echo 'export GOPATH=$_GOPATH' >>/root/.bashrc
#export GOROOT=go env GOROOT
#export GOPATH=$HOME/go
#export PATH=$PATH:$GOROOT/bin:$GOPATH
go get -u github.com/justjanne/powerline-go
Log_Writer "bash powerline font complete "
echo 'export GOROOT=go env GOROOT' >>$HOME/.bashrc
echo 'export GOPATH=$HOME/go' >>$HOME/.bashrc
echo 'export PATH=$PATH:$GOROOT/bin:$GOPATH' >>$HOME/.bashrc
Log_Writer "GOROOT = $GOROOT "
Log_Writer "GOPATH = $GOPATH "
Log_Writer "PATH = $PATH "
echo 'function _update_ps1() {
PS1="$($GOPATH/bin/powerline-go -error $?)"
}
if [ "$TERM" != "linux" ] && [ -f "$GOPATH/bin/powerline-go" ]; then
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fi' >>$HOME/.bashrc
Log_Writer "bashrc complete"
Log_Writer "End of Script File"