add git-sync config variable to .bashrc

This commit is contained in:
Jakobus Schürz 2020-03-04 11:23:44 +01:00
parent 185a06d5dc
commit c4f4014157

View file

@ -494,4 +494,23 @@ turnoffbeep() {
file=~/.inputrc
[ -e "$file" ] && grep -qxF "$line" "$file" || echo "$line" >> "$file"
}
turnoffconfigsync() {
line='MYSHELLCONFIG_GIT_SYNC='
file=~/.bashrc
if [ -e "$file" ] ; then
sed -i -e "/$line/d" "${file}"
fi
sed -i -e "/#MYSHELLCONFIG-start/i${line}false" "$file"
}
turnonconfigsync() {
line='MYSHELLCONFIG_GIT_SYNC='
file=~/.bashrc
if [ -e "$file" ] ; then
sed -i -e "/$line/d" "${file}"
fi
sed -i "/#MYSHELLCONFIG-start/i${line}true" "$file"
}
#EOF