Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
derekhenderson818@gmail.com authored and derekhenderson818@gmail.com committed Oct 12, 2023
1 parent f39dbb9 commit 5621a5e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:

- name: Run setup.sh
run: |
cd ~
pwd
ls -la
cd ..
dotfiles/setup.sh
source .bashrc
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# dotfiles

![Test](https://github.com/D3r3k23/dotfiles/actions/workflows/test.yaml/badge.svg)

### Instructions
1. `$ cd ~`
2. `$ git clone https://github.com/D3r3k23/dotfiles`
3. `$ dotfiles/setup.sh`
Expand Down
3 changes: 3 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ autogen_end="# AUTOGEN: end"

for dotfile in ${dotfiles[@]}; do
if ! [ -f $dotfile ]; then # if dotfile does not exist
echo "creating dotfile: $dotfile"
add_dotfile=true
else # if dotfile exists
if [ $(grep -xc "$autogen_begin" $dotfile) -eq 0 ]; then # if autogen not present
echo "adding to existing dotfile: $dotfile"
echo "" >> $dotfile
add_dotfile=true
else # if autogen already present
echo "dotfile already set up: $dotfile"
add_dotfile=false
fi
fi
Expand Down

0 comments on commit 5621a5e

Please sign in to comment.