Commit 8928fedc authored by Anton Midyukov's avatar Anton Midyukov

repo: setup mirror in install script 99-online-repo.sh

parent 43ff7f17
#!/bin/sh
repo_script=/usr/share/install2/postinstall.d/99-online-repo.sh
[ -f "$repo_script" ] || exit 0
[ -n "$GLOBAL_REPO" ] || exit 0
MIRROR="${GLOBAL_REPO#*/}" # alt, heanet, kiev, yandex, ...
repo_source="/etc/apt/sources.list.d/$MIRROR.list"
if [ ! -s "$repo_source" ]; then
echo "Error: $repo_source is not exist" >&2
exit 1
fi
sed -i "s;repo_source=.*;repo_source=$repo_source;" "$repo_script"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment