Improve the Shell code style.

This commit is contained in:
Cotes Chung
2020-08-19 17:05:58 +08:00
parent 038bccb3ca
commit 10ab9d3364
8 changed files with 86 additions and 85 deletions

View File

@@ -13,12 +13,12 @@ CATEGORIES=false
TAGS=false
LASTMOD=false
WORK_DIR=$(dirname $(dirname $(realpath "$0")))
WORK_DIR="$(dirname $(dirname $(realpath "$0")))"
check_status() {
local _change=$(git status . -s)
if [[ ! -z ${_change} ]]; then
if [[ ! -z $_change ]]; then
echo "Warning: Commit the following changes first:"
echo "$_change"
exit 1
@@ -81,7 +81,7 @@ push() {
main() {
cd $WORK_DIR
cd "$WORK_DIR"
check_status