-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: convert all bash scripts to shell scripts
Signed-off-by: Rong Sen Ng (motss) <wes.ngrongsen@gmail.com>
- Loading branch information
Showing
5 changed files
with
36 additions
and
32 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/sh | ||
|
||
# NOTE: THere is a discrepancy in the npx cache in npm between 8.4.1 and 8.1.4. | ||
# There is an additional zx found in the npx cache when compared to the local npx cache using 8.1.4. | ||
|
||
NPX_CACHE_DIR="$(npm config get cache)/_npx" | ||
|
||
if [ -d "$NPX_CACHE_DIR" ]; then | ||
FILES=$(find "$NPX_CACHE_DIR" -type f | grep -v 'node_modules' | grep -v 'package-lock.json') | ||
# FILES=$(find "$NPX_CACHE_DIR" -type f | grep -v 'node_modules') | ||
|
||
printf '[INFO] Listing all files in the npx cache...\n' | ||
for a in $FILES | ||
do | ||
printf "::group::%s\n" "$a" | ||
cat "$a" | ||
printf "::endgroup::\n" | ||
done | ||
else | ||
printf '[INFO] npx cache not found!\n' | ||
fi | ||
|
||
# NOTE: List all files with human readable size in the npm cache | ||
|
||
# NPM_CACHE_DIR="$(npm config get cache)" | ||
|
||
# if [ -d "$NPM_CACHE_DIR" ]; then | ||
# FILES=$(ls -lhR "$NPM_CACHE_DIR") | ||
|
||
# printf "::group::%s\n" "$FILES" | ||
# printf "::endgroup::" | ||
# fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
npx -y -- zx@latest ./postinstall.mjs |