Skip to content

Commit cd7bed4

Browse files
committed
Merge ch1 to ch2: fix the doc build bug
2 parents d35b0a4 + 85a977d commit cd7bed4

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

merge_chain.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ case "$COMMAND" in
144144
echo "No interrupted state found, cannot continue."
145145
exit 1
146146
fi
147-
read START_BRANCH END_BRANCH ORIGIN_MSG NEXT_BRANCH < "$STATE_FILE"
147+
{ read -r START_BRANCH; read -r END_BRANCH; read -r NEXT_BRANCH; read -r ORIGIN_MSG; } < "$STATE_FILE"
148148
echo "Continuing interrupted merge from ch$NEXT_BRANCH..."
149149
;;
150150

@@ -160,7 +160,7 @@ case "$COMMAND" in
160160

161161
status)
162162
if [[ -f "$STATE_FILE" ]]; then
163-
read START_BRANCH END_BRANCH ORIGIN_MSG NEXT_BRANCH < "$STATE_FILE"
163+
{ read -r START_BRANCH; read -r END_BRANCH; read -r NEXT_BRANCH; read -r ORIGIN_MSG; } < "$STATE_FILE"
164164
echo "Merge status: In progress"
165165
echo "Start branch: ch${START_BRANCH}"
166166
echo "End branch: ch${END_BRANCH}"
@@ -313,14 +313,14 @@ for ((i=NEXT_BRANCH; i<=END_BRANCH; i++)); do
313313
# Check if target branch exists
314314
if ! git show-ref --verify --quiet refs/heads/${CUR_BRANCH}; then
315315
echo "Error: Branch ${CUR_BRANCH} does not exist"
316-
echo "$START_BRANCH $END_BRANCH \"$ORIGIN_MSG\" $i" > "$STATE_FILE"
316+
printf '%s\n' "$START_BRANCH" "$END_BRANCH" "$i" "$ORIGIN_MSG" > "$STATE_FILE"
317317
exit 1
318318
fi
319319

320320
echo "Switching to branch ${CUR_BRANCH}..."
321321
if ! git checkout "${CUR_BRANCH}"; then
322322
echo "Error: Cannot switch to branch ${CUR_BRANCH}"
323-
echo "$START_BRANCH $END_BRANCH \"$ORIGIN_MSG\" $i" > "$STATE_FILE"
323+
printf '%s\n' "$START_BRANCH" "$END_BRANCH" "$i" "$ORIGIN_MSG" > "$STATE_FILE"
324324
exit 1
325325
fi
326326

@@ -336,7 +336,7 @@ for ((i=NEXT_BRANCH; i<=END_BRANCH; i++)); do
336336
echo ""
337337
echo "Or run '$0 abort' to abort the merge"
338338
echo "Or run '$0 status' to check current status"
339-
echo "$START_BRANCH $END_BRANCH \"$ORIGIN_MSG\" $i" > "$STATE_FILE"
339+
printf '%s\n' "$START_BRANCH" "$END_BRANCH" "$i" "$ORIGIN_MSG" > "$STATE_FILE"
340340
exit 1
341341
fi
342342

os/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ build: env $(KERNEL_BIN)
3333

3434
env:
3535
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
36-
cargo install cargo-binutils
36+
cargo install cargo-binutils --locked
3737
rustup component add rust-src
3838
rustup component add llvm-tools-preview
3939

0 commit comments

Comments
 (0)