From c4f40141577cbd1e988c2368d662d4bdc07d0d39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Wed, 4 Mar 2020 11:23:44 +0100 Subject: [PATCH] add git-sync config variable to .bashrc --- functions.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/functions.sh b/functions.sh index ac23b6f..cc0e905 100644 --- a/functions.sh +++ b/functions.sh @@ -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