mirror of
https://github.com/G2-Games/welcome.sh.git
synced 2025-04-19 05:22:53 -05:00
Cfg version bump
This commit is contained in:
parent
a0b7d43b4f
commit
a827741e69
1 changed files with 1 additions and 8 deletions
|
@ -1,17 +1,10 @@
|
||||||
version="${1:-1.0.2}"
|
version="${1:-1.0.2}"
|
||||||
vernum=$(echo $version | sed 's/[.][.]*//g' )
|
vernum=$(echo $version | sed 's/[.][.]*//g' )
|
||||||
cfgver=1
|
cfgver=2
|
||||||
bashrc=~/.bashrc
|
bashrc=~/.bashrc
|
||||||
zshrc=~/.zshrc
|
zshrc=~/.zshrc
|
||||||
originaldir=$PWD
|
originaldir=$PWD
|
||||||
environment=$(ps -o args= -p $$ | grep -Em 1 -o '\w{0,5}sh' | head -1)
|
environment=$(ps -o args= -p $$ | grep -Em 1 -o '\w{0,5}sh' | head -1)
|
||||||
getversion () {
|
|
||||||
if ! [[ -a $1 ]]; then
|
|
||||||
echo "0"
|
|
||||||
else
|
|
||||||
grep version ~/.welcome/$1 | sed 's/.*=//' | sed 's/[.][.]*//g'
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
if [ "$environment" = "bash" ] || [ "$environment" = "zsh" ];
|
if [ "$environment" = "bash" ] || [ "$environment" = "zsh" ];
|
||||||
then
|
then
|
||||||
if ! grep -qs 'bash ~/.welcome/welcome.sh' $bashrc && ! grep -qs 'zsh ~/.welcome/welcome.sh' $zshrc && ! grep -qs 'bash /home/$USER/.welcome/welcome.sh' $bashrc && ! grep -qs 'zsh /home/$USER/.welcome/welcome.sh' $zshrc;
|
if ! grep -qs 'bash ~/.welcome/welcome.sh' $bashrc && ! grep -qs 'zsh ~/.welcome/welcome.sh' $zshrc && ! grep -qs 'bash /home/$USER/.welcome/welcome.sh' $bashrc && ! grep -qs 'zsh /home/$USER/.welcome/welcome.sh' $zshrc;
|
||||||
|
|
Loading…
Reference in a new issue