forked from lix-project/lix
Only clean if the file exists
This commit is contained in:
parent
92ca93528f
commit
3839dda2ec
|
@ -20,8 +20,10 @@ cleanup() {
|
||||||
done
|
done
|
||||||
|
|
||||||
for file in ~/.bash_profile ~/.bash_login ~/.profile ~/.zshenv ~/.zprofile ~/.zshrc ~/.zlogin; do
|
for file in ~/.bash_profile ~/.bash_login ~/.profile ~/.zshenv ~/.zprofile ~/.zshrc ~/.zlogin; do
|
||||||
|
if [ -e "$file" ]; then
|
||||||
cat "$file" | grep -v nix-profile > "$file.next"
|
cat "$file" | grep -v nix-profile > "$file.next"
|
||||||
mv "$file.next" "$file"
|
mv "$file.next" "$file"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue