Better bash

This commit is contained in:
trestletech
2019-06-19 11:04:39 -05:00
parent 384116a76f
commit 67cdcedd4e
2 changed files with 6 additions and 16 deletions

View File

@@ -1,16 +1,11 @@
#!/bin/bash
set -e
# Generate package docs in the working directory
Rscript -e "devtools::document(roclets=c('rd', 'collate', 'namespace'))"
if [ $? -ne 0 ]
then
echo "Error generating Roxygen docs."
exit 1
fi
# This command will return a zero exit code if there are uncommitted changes
test -n "$(git status --porcelain)"
if [ $? -eq 0 ]
if [ -n "$(git status --porcelain)" ]
then
git status --porcelain
echo "Please generate the Roxygen documentation and commit the updates."

View File

@@ -1,16 +1,11 @@
#!/bin/bash
set -e
# Run JS build process
(cd "$(dirname "$0")" && yarn && yarn build)
if [ $? -ne 0 ]
then
echo "Error generating JavaScript assets with yarn."
exit 1
fi
# This command will return a zero exit code if there are uncommitted changes
test -n "$(git status --porcelain)"
if [ $? -eq 0 ]
if [ -n "$(git status --porcelain)" ]
then
git status --porcelain
echo "Please rebuild the JavaScript and commit the changes."