File tree 5 files changed +14
-8
lines changed
5 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -63,8 +63,7 @@ cp "$DEPS_DIR/cares/cares.gyp" "$WORKSPACE/cares"
63
63
cp " $DEPS_DIR /cares/" * .gn " $DEPS_DIR /cares/" * .gni " $WORKSPACE /cares"
64
64
65
65
echo " Replacing existing c-ares"
66
- rm -rf " $DEPS_DIR /cares"
67
- mv " $WORKSPACE /cares" " $DEPS_DIR /"
66
+ replace_dir " $DEPS_DIR /cares" " $WORKSPACE /cares"
68
67
69
68
# Update the version number on maintaining-dependencies.md
70
69
# and print the new version as the last line of the script as we need
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ autoreconf -i
59
59
60
60
./configure --prefix=" $PWD /build" --enable-lib-only
61
61
62
- cp -R lib/ * " $DEPS_DIR /ngtcp2/nghttp3/lib/ "
62
+ replace_dir " $DEPS_DIR /ngtcp2/nghttp3/lib" " lib "
63
63
64
64
# Update the version number on maintaining-dependencies.md
65
65
# and print the new version as the last line of the script as we need
Original file line number Diff line number Diff line change @@ -63,9 +63,8 @@ autoreconf -i
63
63
64
64
./configure --prefix=" $PWD /build" --enable-lib-only
65
65
66
- cp -R lib/* " $DEPS_DIR /ngtcp2/ngtcp2/lib/"
67
-
68
- cp -R crypto/* " $DEPS_DIR /ngtcp2/ngtcp2/crypto/"
66
+ replace_dir " $DEPS_DIR /ngtcp2/ngtcp2/lib" " lib"
67
+ replace_dir " $DEPS_DIR /ngtcp2/ngtcp2/crypto" " crypto"
69
68
70
69
# Update the version number on maintaining-dependencies.md
71
70
# and print the new version as the last line of the script as we need
Original file line number Diff line number Diff line change @@ -68,8 +68,8 @@ mv "$WORKSPACE/"*.gyp "$WORKSPACE/"*.gn "$WORKSPACE/"*.gni "$DEPS_DIR/uvwasi/"
68
68
cd " $DEPS_DIR /uvwasi/"
69
69
70
70
echo " Copying new files to deps folder"
71
- cp -r " $UVWASI_ZIP / include" " $DEPS_DIR /uvwasi/ "
72
- cp -r " $UVWASI_ZIP / src" " $DEPS_DIR /uvwasi/ "
71
+ replace_dir " $DEPS_DIR /uvwasi/ include" " $UVWASI_ZIP /include "
72
+ replace_dir " $DEPS_DIR /uvwasi/ src" " $UVWASI_ZIP /src "
73
73
cp " $UVWASI_ZIP /LICENSE" " $DEPS_DIR /uvwasi/"
74
74
rm -rf " $UVWASI_ZIP "
75
75
Original file line number Diff line number Diff line change @@ -77,3 +77,11 @@ log_and_verify_sha256sum() {
77
77
fi
78
78
fi
79
79
}
80
+
81
+ # This function replaces the directory of a dependency with the new one.
82
+ replace_dir () {
83
+ old_dir=" $1 "
84
+ new_dir=" $2 "
85
+ rm -rf " $old_dir "
86
+ mv " $new_dir " " $old_dir "
87
+ }
You can’t perform that action at this time.
0 commit comments