Skip to content

Commit 8efe8ce

Browse files
committed
ultimate changes
1 parent c61128b commit 8efe8ce

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

netepscript.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,7 @@ RED='\033[0;31m'
77
BOLD='\033[1m'
88
NC='\033[0m'
99

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")
10+
VERSION=$(npm list netepscript -g --depth=0 2>/dev/null | grep netepscript | cut -d@ -f2)
1711

1812
echo -e "${GREEN}=========================================================${NC}"
1913
echo -e "${BLUE} ${BOLD}netepScript v${VERSION}${NC}"

0 commit comments

Comments
 (0)