aboutsummaryrefslogtreecommitdiff
path: root/docker/crupest-debian-dev/bootstrap/apt-source/setup.bash
diff options
context:
space:
mode:
Diffstat (limited to 'docker/crupest-debian-dev/bootstrap/apt-source/setup.bash')
-rwxr-xr-xdocker/crupest-debian-dev/bootstrap/apt-source/setup.bash22
1 files changed, 19 insertions, 3 deletions
diff --git a/docker/crupest-debian-dev/bootstrap/apt-source/setup.bash b/docker/crupest-debian-dev/bootstrap/apt-source/setup.bash
index 60583d4..6e504ef 100755
--- a/docker/crupest-debian-dev/bootstrap/apt-source/setup.bash
+++ b/docker/crupest-debian-dev/bootstrap/apt-source/setup.bash
@@ -2,16 +2,32 @@
set -e
-dir=$(dirname "$0")
+dir=/bootstrap/apt-source
+
+echo "Getting debian version..."
+debian_version=$(bash "$dir/../get-debian-version.bash")
+
+if [[ -z $debian_version ]]; then
+ echo "Debian version not found."
+ exit 1
+else
+ echo "Debian version: $debian_version"
+fi
+
+if [[ $debian_version -ge 12 ]]; then
+ setup_dir=$dir/12
+else
+ setup_dir=$dir/11
+fi
echo "Setting up apt source..."
if [[ -n $CRUPEST_DEBIAN_DEV_IN_CHINA ]]; then
echo "In China, using China source..."
- "$dir/replace-domain.bash" "$(cat "$dir/china-source.txt")"
+ "$setup_dir/replace-domain.bash" "$(cat "$dir/china-source.txt")"
fi
"$dir/install-apt-https.bash"
-"$dir/replace-http.bash"
+"$setup_dir/replace-http.bash"
echo "Setting up apt source done."