mirror of https://github.com/gorhill/uBlock.git
Use local tmp directory (#3821)
This commit is contained in:
parent
bafe824f09
commit
bd8cb8d50f
|
@ -6,10 +6,12 @@ set -e
|
|||
|
||||
DES=dist/build/uBlock0.nodejs
|
||||
|
||||
TMPDIR=tmp
|
||||
mkdir -p $TMPDIR
|
||||
|
||||
# Save existing npm dependencies if present so that we do not have to fetch
|
||||
# them all again
|
||||
if [ -d "$DES/node_modules" ]; then
|
||||
TMPDIR=`mktemp -d`
|
||||
mv "$DES/node_modules" "$TMPDIR/node_modules"
|
||||
fi
|
||||
|
||||
|
@ -81,7 +83,6 @@ cd -
|
|||
# Restore saved npm dependencies
|
||||
if [ -d "$TMPDIR/node_modules" ]; then
|
||||
mv "$TMPDIR/node_modules" "$DES/node_modules"
|
||||
rmdir "$TMPDIR"
|
||||
fi
|
||||
|
||||
echo "*** uBlock0.nodejs: Package done."
|
||||
|
|
Loading…
Reference in New Issue