diff --git a/README.md b/README.md index bd0a36f..f73ae97 100644 --- a/README.md +++ b/README.md @@ -147,10 +147,10 @@ answering the default (just pressing enter) to all questions is fine. incus admin init ``` -Pre-built images are centralized on `devbaseimgs.yunohost.org` and we'll download them from there to speed things up: +Pre-built images are centralized on `https://repo.yunohost.org/incus` and we'll download them from there to speed things up: ```bash -incus remote add yunohost https://devbaseimgs.yunohost.org --public +incus remote add yunohost https://repo.yunohost.org/incus --protocol simplestream --public ``` On Archlinux-based distributions (Arch, Manjaro, ...) it was found that it's needed @@ -186,7 +186,7 @@ cd ynh-dev # if not already done ./ynh-dev start ``` -This should automatically download from `devbaseimgs.yunohost.org` a pre-build +This should automatically download from `https://repo.yunohost.org/incus` a pre-build ynh-dev LXC image running Yunohost unstable, and create a fresh container from it. After starting the LXC, your terminal will automatically be attached to it. If you diff --git a/ynh-dev b/ynh-dev index 52dba31..ed417d2 100755 --- a/ynh-dev +++ b/ynh-dev @@ -200,9 +200,13 @@ function set_incus_remote() critical "You need jq installed for ynh-dev" fi - configured=$(incus remote list -f json | jq 'has("yunohost")') - if [[ "$configured" != "true" ]]; then - incus remote add yunohost https://devbaseimgs.yunohost.org --public + remote_url=$(incus remote list -f json | jq '.yunohost.Addr') + if [[ "${remote_url}" == *"devbaseimgs"* ]]; then + incus remote remove yunohost + remote_url=null + fi + if [[ "$remote_url" == "null" ]]; then + incus remote add yunohost https://repo.yunohost.org/incus --protocol simplestream --public fi } @@ -218,7 +222,7 @@ function start_ynhdev() then if ! incus image info "$BOX-base" &>/dev/null then - LXC_BASE="ynh-dev-$DIST-amd64-$YNH_BRANCH-base" + LXC_BASE="yunohost/$DIST-$YNH_BRANCH/dev" incus launch "yunohost:$LXC_BASE" "$BOX" -c security.nesting=true -c security.privileged=true \ || critical "Failed to launch the container ?" else