mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
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
|
DES=dist/build/uBlock0.nodejs
|
||||||
|
|
||||||
|
TMPDIR=tmp
|
||||||
|
mkdir -p $TMPDIR
|
||||||
|
|
||||||
# Save existing npm dependencies if present so that we do not have to fetch
|
# Save existing npm dependencies if present so that we do not have to fetch
|
||||||
# them all again
|
# them all again
|
||||||
if [ -d "$DES/node_modules" ]; then
|
if [ -d "$DES/node_modules" ]; then
|
||||||
TMPDIR=`mktemp -d`
|
|
||||||
mv "$DES/node_modules" "$TMPDIR/node_modules"
|
mv "$DES/node_modules" "$TMPDIR/node_modules"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -81,7 +83,6 @@ cd -
|
|||||||
# Restore saved npm dependencies
|
# Restore saved npm dependencies
|
||||||
if [ -d "$TMPDIR/node_modules" ]; then
|
if [ -d "$TMPDIR/node_modules" ]; then
|
||||||
mv "$TMPDIR/node_modules" "$DES/node_modules"
|
mv "$TMPDIR/node_modules" "$DES/node_modules"
|
||||||
rmdir "$TMPDIR"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "*** uBlock0.nodejs: Package done."
|
echo "*** uBlock0.nodejs: Package done."
|
||||||
|
Loading…
Reference in New Issue
Block a user