Skip to content

Commit

Permalink
Move order of syntax check
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-m committed May 25, 2017
1 parent ccbcbc2 commit 46251bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 8 additions & 0 deletions startup.d/20-syntax-check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

python -m py_compile $(find . -name '*.py');
if [ "$?" != "0" ]
then
echo "There is syntax error. This may endanger chaos. Pauses updates."
killall bash
fi
7 changes: 0 additions & 7 deletions startup.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
#!/usr/bin/env bash
cd "$(dirname "$0")"

python -m py_compile $(find . -name '*.py');
if [ "$?" != "0" ]
then
echo "There is syntax error. This may endanger chaos. Pauses updates."
exit
fi

for file in startup.d/*; do
[[ -f "$file" && -x "$file" ]] && "$file"
done

0 comments on commit 46251bb

Please # to comment.