Skip to content

Commit

Permalink
Merge pull request #154 from happy-game/dev
Browse files Browse the repository at this point in the history
Dev 修复 `openwrt`的 getsrc 和 resetsrc
  • Loading branch information
happy-game authored Dec 14, 2024
2 parents edb5907 + d586de2 commit 0b9e4c3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/recipe/os/OpenWrt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* SPDX-License-Identifier: GPL-3.0-or-later
* -------------------------------------------------------------
* File Authors : Aoran Zeng <[email protected]>
* Contributors : Yangmoooo <[email protected]>
* Contributors : Yangmoooo <[email protected]>
* | happy game <[email protected]>
* |
* Created On : <2024-08-08>
* Last Modified : <2024-12-14>
Expand Down Expand Up @@ -50,8 +51,9 @@ os_openwrt_setsrc (char *option)

chsrc_backup (OS_OpenWRT_SourceConfig);

char *cmd = xy_strjoin (3, "sed -E -i 's@https?://.*/releases@", source.url, "@g' " OS_OpenWRT_SourceConfig);
char *cmd = xy_strjoin (3, "sed -E -i 's@https?://.*/releases@", source.url, "/releases@g' " OS_OpenWRT_SourceConfig);

chsrc_run (cmd, RunOpt_No_Last_New_Line);
chsrc_run ("opkg update", RunOpt_No_Last_New_Line);

ProgMode_ChgType = ProgMode_CMD_Reset ? ChgType_Reset : ChgType_Auto;
Expand Down Expand Up @@ -84,4 +86,4 @@ os_openwrt_feat (char *option)
}


def_target_gsf(os_openwrt);
def_target_gsrf(os_openwrt);

0 comments on commit 0b9e4c3

Please sign in to comment.