You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
495 B

3 years ago
#!/bin/sh
# enable online repos if possible, just quit if list is absent
repo_source='/etc/apt/sources.list.d/yandex.list'
[ -z "$GLOBAL_ROOTFS_MAIN" ] || exit 0
[ -s "$repo_source" ] || exit 0
# regexps from alterator-pkg (via installer-feature-online-repo)
prefix_re="[[:space:]]*rpm[[:space:]]\+\([^[:space:]]\+[[:space:]]\+\)\?"
host_re="http:\/\/\([^[:space:]]\+\)[[:space:]]\+"
updates_re="${prefix_re}${host_re}\([^[:space:]]\+\/\)\?"
sed -i "s/^#\($updates_re\)/\1/" "$repo_source"