Skip to content

Commit 03e81a8

Browse files
committed
Clean-up and improve error management of unbuild command
1 parent 3b604ba commit 03e81a8

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

scripts/BigRedButton

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ npm run build -- -M raspi2 && npm test -- -M raspi2 || exit 12
3434
STEP_DIR=$PREBUILD
3535

3636
mkdir -p prebuilds &&
37-
tar -cf - ${PRODUCTS[@]} | gzip > $PREBUILD || err 20
37+
tar -cf - ${PRODUCTS[@]} | gzip > $STEP_DIR || err 20
3838

3939

4040
#

scripts/unbuild

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/env sh
22

3-
rm -rf build/ deps/
4-
rm -rf bin/ lib/ libexec/ share/ *-nodeos-linux-musl*
3+
PRODUCTS=(bin lib libexec share *-nodeos-linux-musl*)
54

6-
npm run prepublish -- --force
5+
rm -rf build/ deps/ || exit 1
6+
rm -rf ${PRODUCTS[@]} || exit 2
7+
8+
npm run prepublish -- --force || exit 10

0 commit comments

Comments
 (0)