Avoid reprocessing bashrc
This commit is contained in:
parent
a307d3a81e
commit
ca24a885d2
|
@ -2104,13 +2104,14 @@ function mesh_cjdns_tools {
|
|||
if [ ! -f ~/.bashrc ]; then
|
||||
touch ~/.bashrc
|
||||
fi
|
||||
export GOPATH=$HOME/projects/go
|
||||
if ! grep -q "export GOPATH=" ~/.bashrc; then
|
||||
echo 'export GOPATH=$HOME/projects/go' >> ~/.bashrc
|
||||
fi
|
||||
if ! grep -q "export PATH=$PATH:$HOME/projects/go/bin" ~/.bashrc; then
|
||||
export PATH=$PATH:$HOME/projects/go/bin
|
||||
echo 'export PATH=$PATH:$HOME/projects/go/bin' >> ~/.bashrc
|
||||
fi
|
||||
. ~/.bashrc
|
||||
export GOPATH=$HOME/projects/go
|
||||
export PATH=$PATH:$HOME/projects/go/bin
|
||||
go get github.com/inhies/cjdcmd
|
||||
|
@ -6401,6 +6402,7 @@ function install_gogs {
|
|||
fi
|
||||
|
||||
export GOPATH=/home/git/go
|
||||
systemctl set-environment GOPATH=/home/git/go
|
||||
|
||||
# update to the next commit
|
||||
if [ -d /var/www/$GIT_DOMAIN_NAME ]; then
|
||||
|
@ -6446,7 +6448,6 @@ function install_gogs {
|
|||
echo 'export GOPATH=/home/git/go' >> ~/.bashrc
|
||||
echo 'systemctl set-environment GOPATH=/home/git/go' >> ~/.bashrc
|
||||
fi
|
||||
. ~/.bashrc
|
||||
if [ ! -d $GOPATH ]; then
|
||||
mkdir -p $GOPATH
|
||||
fi
|
||||
|
@ -9382,6 +9383,9 @@ function install_ipfs {
|
|||
return
|
||||
fi
|
||||
|
||||
export GOPATH=/home/git/go
|
||||
systemctl set-environment GOPATH=/home/git/go
|
||||
|
||||
# update to the next commit
|
||||
if [ -d /home/git/go/src/github.com/ipfs/go-ipfs ]; then
|
||||
if grep -q "ipfs commit" $COMPLETION_FILE; then
|
||||
|
@ -9417,7 +9421,6 @@ function install_ipfs {
|
|||
echo 'export GOPATH=/home/git/go' >> ~/.bashrc
|
||||
echo 'systemctl set-environment GOPATH=/home/git/go' >> ~/.bashrc
|
||||
fi
|
||||
. ~/.bashrc
|
||||
export GOPATH=/home/git/go
|
||||
if [ ! -d $GOPATH ]; then
|
||||
mkdir -p $GOPATH
|
||||
|
@ -9426,9 +9429,9 @@ function install_ipfs {
|
|||
|
||||
IPFS_PATH=/home/git/go/bin
|
||||
if ! grep -q 'GOPATH/bin' ~/.bashrc; then
|
||||
export PATH="$GOPATH/bin:$PATH:"
|
||||
echo 'export PATH="$GOPATH/bin:$PATH:";' >> ~/.bashrc
|
||||
fi
|
||||
. ~/.bashrc
|
||||
|
||||
# set gopath for the user
|
||||
if ! grep -q "GOPATH=" /home/$MY_USERNAME/.bashrc; then
|
||||
|
|
|
@ -242,10 +242,8 @@ if [ -f ~/.initial_setup ]; then
|
|||
fi
|
||||
EOF
|
||||
|
||||
cat >> $rootdir/root/.bashrc <<EOF
|
||||
# initial setup of the system
|
||||
if [ -f ~/.initial_setup ]; then
|
||||
EOF
|
||||
echo '# initial setup of the system' >> $rootdir/root/.bashrc
|
||||
echo 'if [ -f ~/.initial_setup ]; then' >> $rootdir/root/.bashrc
|
||||
echo ' if [ -f ~/login.txt ]; then' >> $rootdir/root/.bashrc
|
||||
echo ' NEW_USER_PASSWORD=$(printf `cat ~/login.txt`)' >> $rootdir/root/.bashrc
|
||||
echo ' else' >> $rootdir/root/.bashrc
|
||||
|
|
Loading…
Reference in New Issue