Skip to content

Commit

Permalink
Improve bash scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
alanvardy committed May 17, 2023
1 parent 94f9f68 commit c2617de
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions lint_string.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
grep -rE --include="*.rs" "$1" .
if [ $? -eq 0 ]; then

if grep -rE --include="*.rs" "$1" .; then
echo "'$1's found."
exit 1
else
Expand Down
2 changes: 2 additions & 0 deletions manual_test.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

# Does not cover complete function

echo "== TESTING -p how much wood can a woodchuck chuck if the woodchuck is 5lb and the wood is oak ==" && \
Expand Down
11 changes: 6 additions & 5 deletions push_aur.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/bin/sh
cd ../gpto-bin/
#!/bin/bash

cd ../gpto-bin/ || exit
git pull
cd ../gpto/
cd ../gpto/ || exit
makepkg --printsrcinfo > ../gpto-bin/.SRCINFO
mv PKGBUILD ../gpto-bin/
rm *.tar.gz
cd ../gpto-bin/
cd ../gpto-bin/ || exit
git add .
git commit -m "new version"
git push aur
cd ../gpto
cd ../gpto || exit
3 changes: 2 additions & 1 deletion test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
#!/bin/bash

cargo fmt &&
cargo clippy -- -D warnings &&
cargo tarpaulin -o lcov &&
Expand Down
3 changes: 2 additions & 1 deletion update_test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
#!/bin/bash

cargo update && \
./test.sh && \
./manual_test.sh
5 changes: 0 additions & 5 deletions watch.sh

This file was deleted.

0 comments on commit c2617de

Please sign in to comment.