Skip to content

Commit fd6d50a

Browse files
committed
chore: reset MAIN_REPO_URL for merge
also refactor init_repos() slightly
1 parent 2a1c265 commit fd6d50a

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

deb-get

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -654,13 +654,12 @@ function init_repos() {
654654
if [ ! -e "${ETC_DIR}/01-main.repo" ]; then
655655
${ELEVATE} tee "${ETC_DIR}/01-main.repo" <<<"${MAIN_REPO_URL}" >/dev/null
656656
fi
657-
if [ ! -e "${ETC_DIR}/02-main.repo" ]; then
658-
${ELEVATE} sed 's/01/02/' "${ETC_DIR}/01-main.repo" > "${ETC_DIR}/02-main.repo"
659-
fi
660-
if [ ! -e "${ETC_DIR}/03-main.repo" ]; then
661-
${ELEVATE} sed 's/01/03/' "${ETC_DIR}/01-main.repo" > "${ETC_DIR}/03-main.repo"
662-
fi
663-
657+
for subrepo in 02 03; do
658+
if [ ! -e "${ETC_DIR}/${subrepo}-main.repo" ]; then
659+
${ELEVATE} head -1 "${ETC_DIR}/01-main.repo" | sed "s/01/${subrepo}/" > "${ETC_DIR}/${subrepo}-main.repo"
660+
fi
661+
done
662+
664663
for REPO in $(find "${ETC_DIR}" -maxdepth 1 -name "*.repo" ! -name 00-builtin.repo ! -name 99-local.repo -type f -printf "%f\n" | sed "s/.repo$//"); do
665664
if [ ! -e "${ETC_DIR}/${REPO}.d" ]; then
666665
${ELEVATE} mkdir "${ETC_DIR}/${REPO}.d" 2>/dev/null
@@ -1582,11 +1581,9 @@ fi
15821581

15831582
export CACHE_DIR="/var/cache/deb-get"
15841583
readonly ETC_DIR="/etc/deb-get"
1585-
readonly MAIN_REPO_URL="https://raw.githubusercontent.com/philclifford/deb-get/split_github_repos/01-main"
1586-
1584+
readonly MAIN_REPO_URL="https://raw.githubusercontent.com/wimpysworld/deb-get/main/01-main"
15871585
readonly USER_AGENT="Mozilla/5.0 (X11; Linux ${HOST_CPU}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"
15881586
readonly USER_HOME="${HOME}"
1589-
15901587
readonly DEBGET_BIN=$(basename $0)
15911588

15921589
parse_machine

0 commit comments

Comments
 (0)