From 3cf53395a4c24a21c093e2d6abec613c41fc678f Mon Sep 17 00:00:00 2001 From: ZennDev1337 Date: Thu, 25 Jul 2024 10:18:26 +0000 Subject: [PATCH 1/3] =?UTF-8?q?fetch=5Fdotfiles.sh=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fetch_dotfiles.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 fetch_dotfiles.sh diff --git a/fetch_dotfiles.sh b/fetch_dotfiles.sh new file mode 100644 index 0000000..20ce357 --- /dev/null +++ b/fetch_dotfiles.sh @@ -0,0 +1,15 @@ + +git clone --bare https://repo.zenndev.xyz/ZennDev1337/dotfiles.git $HOME/.cfg +function config { + /usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@ +} +mkdir -p .config-backup +config checkout +if [ $? = 0 ]; then + echo "Checked out config."; + else + echo "Backing up pre-existing dot files."; + config checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .config-backup/{} +fi; +config checkout +config config status.showUntrackedFiles no From b1d1499d14564e875acd34bde0cb993a67b1a684 Mon Sep 17 00:00:00 2001 From: ZennDev1337 Date: Thu, 25 Jul 2024 11:30:47 +0000 Subject: [PATCH 2/3] =?UTF-8?q?readme.md=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- readme.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 readme.md diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..59a8e30 --- /dev/null +++ b/readme.md @@ -0,0 +1,7 @@ +Tutorial https://www.atlassian.com/git/tutorials/dotfiles + + +use just +```bash +source <(curl -s https://repo.zenndev.xyz/ZennDev1337/dotfiles/raw/branch/main/fetch_dotfiles.sh) +``` \ No newline at end of file From 1fb96f6678bff4c59a12332635b391dfa6d061f9 Mon Sep 17 00:00:00 2001 From: ZennDev1337 Date: Thu, 25 Jul 2024 11:32:18 +0000 Subject: [PATCH 3/3] fetch_dotfiles.sh aktualisiert --- fetch_dotfiles.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fetch_dotfiles.sh b/fetch_dotfiles.sh index 20ce357..e16f9dc 100644 --- a/fetch_dotfiles.sh +++ b/fetch_dotfiles.sh @@ -1,4 +1,3 @@ - git clone --bare https://repo.zenndev.xyz/ZennDev1337/dotfiles.git $HOME/.cfg function config { /usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@ @@ -13,3 +12,5 @@ if [ $? = 0 ]; then fi; config checkout config config status.showUntrackedFiles no +rm -f $HOME/readme.md +rm -f $HOME/fetch_dotfiles.sh \ No newline at end of file