forked from Interanet/server-bootstrap
29 lines
571 B
Bash
29 lines
571 B
Bash
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
echo "================================="
|
|
echo " Liara OpenSUSE Mirror Setup"
|
|
echo "================================="
|
|
|
|
if ! command -v zypper &> /dev/null; then
|
|
echo "This script only supports OpenSUSE."
|
|
exit 1
|
|
fi
|
|
|
|
echo
|
|
echo "[1/2] Adding Liara repository..."
|
|
|
|
zypper addrepo \
|
|
--priority 100 \
|
|
--no-gpgcheck \
|
|
https://linux-mirror.liara.ir/repository/opensuse/distribution/leap/\$releasever/repo/oss/ \
|
|
opensuse-oss
|
|
|
|
echo
|
|
echo "[2/2] Refreshing repositories..."
|
|
zypper refresh
|
|
|
|
echo
|
|
echo "OpenSUSE mirror configured successfully."
|