refactor(setup.sh): make .env easier to setup
This commit is contained in:
parent
3da4364871
commit
142cf84612
2 changed files with 8 additions and 7 deletions
8
getenv.sh
Normal file
8
getenv.sh
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ ! -f ~/.env ] ; then
|
||||||
|
cat << EOF >> ~/.env
|
||||||
|
SERV_COLOR="32"
|
||||||
|
USER="$USER"
|
||||||
|
EOF
|
||||||
|
fi
|
7
setup.sh
7
setup.sh
|
@ -9,14 +9,7 @@ TODELETE="$(command ls --almost-all files) .PS1"
|
||||||
cp -r ./files/. /root
|
cp -r ./files/. /root
|
||||||
for f in ./files/.*; do if [[ -f $f ]]; then ln ./$f ../../ ; fi; done
|
for f in ./files/.*; do if [[ -f $f ]]; then ln ./$f ../../ ; fi; done
|
||||||
|
|
||||||
# dotenv
|
|
||||||
if [ ! -f ../../.env ] ; then
|
|
||||||
cat << EOF >> ../../.env
|
|
||||||
SERV_COLOR="32"
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
source ./setenv.sh
|
source ./setenv.sh
|
||||||
chown $USER:$USER ../../.env
|
|
||||||
|
|
||||||
## root PS1
|
## root PS1
|
||||||
RED="01;31m"
|
RED="01;31m"
|
||||||
|
|
Loading…
Reference in a new issue