Skip to content

Commit

Permalink
Add install script and lazygit config
Browse files Browse the repository at this point in the history
  • Loading branch information
felixschndr committed Jul 14, 2024
1 parent 2c8942e commit 747af51
Show file tree
Hide file tree
Showing 17 changed files with 39 additions and 17 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
26 changes: 13 additions & 13 deletions gitconfig → Configurations/gitconfig
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[user]
name = Felix Schneider
email = [email protected]
[init]
defaultBranch = main
[commit]
gpgsign = true
[core]
autocrlf = input
[help]
autocorrect = 15
[push]
autoSetupRemote = true
[user]
name = Felix Schneider
email = [email protected]
[init]
defaultBranch = main
[commit]
gpgsign = true
[core]
autocrlf = input
[help]
autocorrect = 15
[push]
autoSetupRemote = true
5 changes: 5 additions & 0 deletions Configurations/lazygit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
promptToReturnFromSubprocess: false
notARepository: skip
os:
edit: nano {{filename}}
editAtLine: nano +{{line}} {{filename}}
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@ These are my personal bash aliases and functions I use on a daily basis bundeled
## Installation

```bash
echo "source /home/${USER}/dotfiles/sourcer" >> ~/.bashrc
(crontab -l 2>/dev/null; echo "0 */3 * * * cd /home/${USER}/dotfiles/ && git pull") | crontab -
ln -sf /home/${USER}/dotfiles/gitconfig ~/.gitconfig
./install
```
19 changes: 19 additions & 0 deletions install
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash


if ! grep -q "source /home/${USER}/dotfiles/sourcer" /home/${USER}/.bashrc; then
echo "Installing link to bashrc..."
echo "source /home/${USER}/dotfiles/sourcer" >> ~/.bashrc
fi

if ! crontab -l | grep -q "cd /home/${USER}/dotfiles/ && git pull"; then
echo "Installing crontab to update the repository regularly..."
(crontab -l 2>/dev/null; echo "0 */3 * * * cd /home/${USER}/dotfiles/ && git pull") | crontab -
fi

echo "Linking configuration files..."
ln -sf /home/${USER}/dotfiles/Configurations/gitconfig /home/${USER}/.gitconfig
ln -sf /home/${USER}/dotfiles/Configurations/lazygit.yml /home/${USER}/.config/lazygit/config.yml

echo "Finished 🎉"
exit 0
2 changes: 1 addition & 1 deletion sourcer
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

repoLocation="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

allFiles=$(find "${repoLocation}"/{default,"$(hostname | tr '[:upper:]' '[:lower:]')"} -type f 2>/dev/null)
allFiles=$(find "${repoLocation}"/AliasesAndFunctions/{default,"$(hostname | tr '[:upper:]' '[:lower:]')"} -type f 2>/dev/null)

for file in ${allFiles}; do
# shellcheck disable=1090
Expand Down

0 comments on commit 747af51

Please sign in to comment.