mirror of
https://github.com/G2-Games/welcome.sh.git
synced 2025-04-19 05:22:53 -05:00
Patch, fixed ZSH line removal
This commit is contained in:
parent
caa1e26c0f
commit
5d1920dfb2
1 changed files with 2 additions and 2 deletions
|
@ -92,7 +92,7 @@ then
|
|||
echo 'bash ~/.welcome/welcome.sh' >> $bashrc
|
||||
|
||||
lines=$(grep -sn 'zsh ~/.welcome/welcome.sh' $zshrc | sed -e 's/:.*//g' && grep -sn 'zsh /home/$USER/.welcome/welcome.sh' $zshrc | sed -e 's/:.*//g')
|
||||
lines=$(printf '%s\n' "${lines[@]}" | sort | tac | tr '\n' ' '; echo)
|
||||
lines=$(printf '%s\n' "$( echo "$lines" )" | sort | tac | tr '\n' ' '; echo)
|
||||
for i in $( echo "$lines" ); do
|
||||
sed "${i}d" $zshrc > file.tmp && mv file.tmp $zshrc
|
||||
done
|
||||
|
@ -126,7 +126,7 @@ then
|
|||
done
|
||||
|
||||
lines=$(grep -sn 'zsh ~/.welcome/welcome.sh' $zshrc | sed -e 's/:.*//g' && grep -sn 'zsh /home/$USER/.welcome/welcome.sh' $zshrc | sed -e 's/:.*//g')
|
||||
lines=$(printf '%s\n' "${lines[@]}" | sort | tac | tr '\n' ' '; echo)
|
||||
lines=$(printf '%s\n' "$( echo "$lines" )" | sort | tac | tr '\n' ' '; echo)
|
||||
for i in $( echo "$lines" ); do
|
||||
sed "${i}d" $zshrc > file.tmp && mv file.tmp $zshrc
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue