Skip to content

Commit 571e3ad

Browse files
committed
add changes
1 parent 0849a94 commit 571e3ad

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

netepscript.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@ BLUE='\033[0;34m'
55
YELLOW='\033[1;33m'
66
RED='\033[0;31m'
77
BOLD='\033[1m'
8-
NC='\033[0m' # No Color (for reset)
8+
NC='\033[0m'
99

10-
VERSION=$(jq -r .version package.json)
10+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
11+
PACKAGE_JSON="$SCRIPT_DIR/package.json"
12+
if [ ! -f "$PACKAGE_JSON" ]; then
13+
echo -e "${RED}Error: package.json not found in $PACKAGE_JSON${NC}"
14+
exit 1
15+
fi
16+
VERSION=$(jq -r .version "$PACKAGE_JSON")
1117

1218
echo -e "${GREEN}=========================================================${NC}"
1319
echo -e "${BLUE} ${BOLD}netepScript v${VERSION}${NC}"

0 commit comments

Comments
 (0)