Skip to content

Commit 15b618b

Browse files
Update build_adventurecoin_mac.sh
1 parent 05a41ff commit 15b618b

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

build_adventurecoin_mac.sh

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,14 @@ done
122122

123123
# is_complete -> is_absolute fix
124124
PROTOCOL_CPP="rpc/protocol.cpp"
125-
TARGET_LINE='if (!path.is_complete()) path = GetDataDir() / path;'
126-
REPLACEMENT_LINE='if (!path.is_absolute()) path = GetDataDir() / path;'
127-
128-
if grep -Fxq "$TARGET_LINE" "$PROTOCOL_CPP"; then
129-
echo -e "${GREEN}>>> Patching deprecated is_complete()...${RESET}"
130-
sed -i.bak "s|$TARGET_LINE|$REPLACEMENT_LINE|" "$PROTOCOL_CPP"
131-
echo -e "${CYAN}✔ Replaced deprecated is_complete() with is_absolute()${RESET}"
125+
if grep -q 'is_complete' "$PROTOCOL_CPP"; then
126+
echo -e "${GREEN}>>> Patching deprecated is_complete() in $PROTOCOL_CPP...${RESET}"
127+
sed -i.bak 's/\.is_complete()/\.is_absolute()/g' "$PROTOCOL_CPP"
128+
echo -e "${CYAN}✔ Patched: .is_complete() → .is_absolute()${RESET}"
132129
else
133-
echo -e "${CYAN}✔ No matching deprecated line found in $PROTOCOL_CPP${RESET}"
130+
echo -e "${CYAN}✔ No .is_complete() usage found in $PROTOCOL_CPP${RESET}"
134131
fi
135132

136-
137133
# --------------------------
138134
# Build
139135
# --------------------------

0 commit comments

Comments
 (0)