Skip to content

Commit ab9566b

Browse files
committed
fixup! tools: add script to update c-ares
1 parent db9a04e commit ab9566b

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

tools/update-cares.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,28 @@ cleanup () {
2424

2525
trap cleanup INT TERM EXIT
2626

27-
ARES_REF=cares-$(echo $ARES_VERSION | tr . _)
28-
ARES_TARBALL=c-ares-$ARES_VERSION.tar.gz
27+
ARES_REF="cares-$(echo $ARES_VERSION | tr . _)"
28+
ARES_TARBALL="c-ares-$ARES_VERSION.tar.gz"
2929

3030
cd "$WORKSPACE"
3131

3232
echo "Fetching c-ares source archive"
33-
curl -sL -o $ARES_TARBALL https://github.com/c-ares/c-ares/releases/download/$ARES_REF/$ARES_TARBALL
34-
gzip -dc $ARES_TARBALL | tar xf -
35-
rm $ARES_TARBALL
33+
curl -sL -o "$ARES_TARBALL" "https://github.com/c-ares/c-ares/releases/download/$ARES_REF/$ARES_TARBALL"
34+
gzip -dc "$ARES_TARBALL" | tar xf -
35+
rm "$ARES_TARBALL"
3636
mv "c-ares-$ARES_VERSION" cares
3737

3838
echo "Removing tests"
39-
rm -rf $WORKSPACE/cares/test
39+
rm -rf "$WORKSPACE/cares/test"
4040

4141
echo "Copying existing .gitignore, config and gyp files"
42-
cp -R $DEPS_DIR/cares/config $WORKSPACE/cares
43-
cp $DEPS_DIR/cares/.gitignore $WORKSPACE/cares
44-
cp $DEPS_DIR/cares/cares.gyp $WORKSPACE/cares
42+
cp -R "$DEPS_DIR/cares/config" "$WORKSPACE/cares"
43+
cp "$DEPS_DIR/cares/.gitignore" "$WORKSPACE/cares"
44+
cp "$DEPS_DIR/cares/cares.gyp" "$WORKSPACE/cares"
4545

4646
echo "Replacing existing c-ares"
47-
rm -rf $DEPS_DIR/cares
48-
mv $WORKSPACE/cares $DEPS_DIR/
47+
rm -rf "$DEPS_DIR/cares"
48+
mv "$WORKSPACE/cares" "$DEPS_DIR/"
4949

5050
echo "All done!"
5151
echo ""

0 commit comments

Comments
 (0)