aboutsummaryrefslogtreecommitdiff
path: root/docker/debian-dev/bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'docker/debian-dev/bootstrap')
-rw-r--r--docker/debian-dev/bootstrap/apt-source/china-source.txt1
-rwxr-xr-xdocker/debian-dev/bootstrap/apt-source/get-domain.bash5
-rwxr-xr-xdocker/debian-dev/bootstrap/apt-source/install-apt-https.bash7
-rwxr-xr-xdocker/debian-dev/bootstrap/apt-source/replace-domain.bash7
-rwxr-xr-xdocker/debian-dev/bootstrap/apt-source/replace-http.bash7
-rwxr-xr-xdocker/debian-dev/bootstrap/apt-source/setup.bash12
-rw-r--r--docker/debian-dev/bootstrap/bash-profile/bash-completion.bash4
-rw-r--r--docker/debian-dev/bootstrap/bash-profile/code-server.bash12
-rw-r--r--docker/debian-dev/bootstrap/bash-profile/dquilt.bash4
-rwxr-xr-xdocker/debian-dev/bootstrap/extra/setup-cmake.bash9
-rwxr-xr-xdocker/debian-dev/bootstrap/extra/setup-dotnet.bash10
-rwxr-xr-xdocker/debian-dev/bootstrap/extra/setup-llvm.bash16
-rw-r--r--docker/debian-dev/bootstrap/func.bash15
-rw-r--r--docker/debian-dev/bootstrap/home-dot/devscripts1
-rw-r--r--docker/debian-dev/bootstrap/home-dot/quiltrc-dpkg13
-rwxr-xr-xdocker/debian-dev/bootstrap/setup-base.bash11
-rwxr-xr-xdocker/debian-dev/bootstrap/setup-code-server.bash14
-rwxr-xr-xdocker/debian-dev/bootstrap/setup-dev.bash12
-rwxr-xr-xdocker/debian-dev/bootstrap/setup-user.bash9
-rwxr-xr-xdocker/debian-dev/bootstrap/setup.bash20
20 files changed, 0 insertions, 189 deletions
diff --git a/docker/debian-dev/bootstrap/apt-source/china-source.txt b/docker/debian-dev/bootstrap/apt-source/china-source.txt
deleted file mode 100644
index 3821ffc..0000000
--- a/docker/debian-dev/bootstrap/apt-source/china-source.txt
+++ /dev/null
@@ -1 +0,0 @@
-mirrors.ustc.edu.cn
diff --git a/docker/debian-dev/bootstrap/apt-source/get-domain.bash b/docker/debian-dev/bootstrap/apt-source/get-domain.bash
deleted file mode 100755
index d44ea65..0000000
--- a/docker/debian-dev/bootstrap/apt-source/get-domain.bash
+++ /dev/null
@@ -1,5 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-sed "s|.*https\?://\([-_.a-zA-Z0-9]\+\)/.*|\\1|;q" /etc/apt/sources.list
diff --git a/docker/debian-dev/bootstrap/apt-source/install-apt-https.bash b/docker/debian-dev/bootstrap/apt-source/install-apt-https.bash
deleted file mode 100755
index 05d372b..0000000
--- a/docker/debian-dev/bootstrap/apt-source/install-apt-https.bash
+++ /dev/null
@@ -1,7 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-echo "Install apt https transport."
-apt-get update
-apt-get install -y apt-transport-https ca-certificates
diff --git a/docker/debian-dev/bootstrap/apt-source/replace-domain.bash b/docker/debian-dev/bootstrap/apt-source/replace-domain.bash
deleted file mode 100755
index 86e88dc..0000000
--- a/docker/debian-dev/bootstrap/apt-source/replace-domain.bash
+++ /dev/null
@@ -1,7 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-echo "Backup /etc/apt/sources.list to /etc/apt/sources.list.bak."
-echo "Replace source domain in /etc/apt/sources.list to $1."
-sed -i.bak "s|\(https\?://\)[-_.a-zA-Z0-9]\+/|\\1$1/|" /etc/apt/sources.list
diff --git a/docker/debian-dev/bootstrap/apt-source/replace-http.bash b/docker/debian-dev/bootstrap/apt-source/replace-http.bash
deleted file mode 100755
index fae082a..0000000
--- a/docker/debian-dev/bootstrap/apt-source/replace-http.bash
+++ /dev/null
@@ -1,7 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-echo "Backup /etc/apt/sources.list to /etc/apt/sources.list.bak."
-echo "Replace http to https in /etc/apt/sources.list."
-sed -i.bak 's/https\?/https/' /etc/apt/sources.list
diff --git a/docker/debian-dev/bootstrap/apt-source/setup.bash b/docker/debian-dev/bootstrap/apt-source/setup.bash
deleted file mode 100755
index 60e635b..0000000
--- a/docker/debian-dev/bootstrap/apt-source/setup.bash
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-dir=$(dirname "$0")
-
-if [[ -n $IN_CHINA ]]; then
- "$dir/replace-domain.bash" "$(cat "$dir/china-source.txt")"
-fi
-
-"$dir/install-apt-https.bash"
-"$dir/replace-http.bash"
diff --git a/docker/debian-dev/bootstrap/bash-profile/bash-completion.bash b/docker/debian-dev/bootstrap/bash-profile/bash-completion.bash
deleted file mode 100644
index 75f8333..0000000
--- a/docker/debian-dev/bootstrap/bash-profile/bash-completion.bash
+++ /dev/null
@@ -1,4 +0,0 @@
-if [ -f /etc/bash_completion ]; then
- . /etc/bash_completion
-fi
-
diff --git a/docker/debian-dev/bootstrap/bash-profile/code-server.bash b/docker/debian-dev/bootstrap/bash-profile/code-server.bash
deleted file mode 100644
index 443eb0b..0000000
--- a/docker/debian-dev/bootstrap/bash-profile/code-server.bash
+++ /dev/null
@@ -1,12 +0,0 @@
-export CODE_SERVER_CONFIG="/data/code-server-config.yaml"
-
-CODE_SERVER_PROGRAM=code-server
-CODE_SERVER_PORT=8080
-
-if which "$CODE_SERVER_PROGRAM" > /dev/null 2>&1; then
- if ! pgrep -f "$CODE_SERVER_PROGRAM" > /dev/null 2>&1; then
- mkdir -p ~/.local/share/code-server
- nohup "$CODE_SERVER_PROGRAM" "--bind-addr", "0.0.0.0:$CODE_SERVER_PORT" \
- > ~/.local/share/code-server/log 2> ~/.local/share/code-server/error &
- fi
-fi
diff --git a/docker/debian-dev/bootstrap/bash-profile/dquilt.bash b/docker/debian-dev/bootstrap/bash-profile/dquilt.bash
deleted file mode 100644
index 96a4eb2..0000000
--- a/docker/debian-dev/bootstrap/bash-profile/dquilt.bash
+++ /dev/null
@@ -1,4 +0,0 @@
-alias dquilt="quilt --quiltrc=${HOME}/.quiltrc-dpkg"
-. /usr/share/bash-completion/completions/quilt
-complete -F _quilt_completion $_quilt_complete_opt dquilt
-
diff --git a/docker/debian-dev/bootstrap/extra/setup-cmake.bash b/docker/debian-dev/bootstrap/extra/setup-cmake.bash
deleted file mode 100755
index 76c1ae4..0000000
--- a/docker/debian-dev/bootstrap/extra/setup-cmake.bash
+++ /dev/null
@@ -1,9 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-CMAKE_VERSION=$(curl -s https://api.github.com/repos/Kitware/CMake/releases/latest | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/')
-wget -O cmake-installer.sh https://github.com/Kitware/CMake/releases/download/v"$CMAKE_VERSION"/cmake-"$CMAKE_VERSION"-linux-x86_64.sh
-chmod +x cmake-installer.sh
-./cmake-installer.sh --skip-license --prefix=/usr
-rm cmake-installer.sh
diff --git a/docker/debian-dev/bootstrap/extra/setup-dotnet.bash b/docker/debian-dev/bootstrap/extra/setup-dotnet.bash
deleted file mode 100755
index 0ef7743..0000000
--- a/docker/debian-dev/bootstrap/extra/setup-dotnet.bash
+++ /dev/null
@@ -1,10 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
-dpkg -i packages-microsoft-prod.deb
-rm packages-microsoft-prod.deb
-
-apt-get update
-apt-get install -y dotnet-sdk-7.0
diff --git a/docker/debian-dev/bootstrap/extra/setup-llvm.bash b/docker/debian-dev/bootstrap/extra/setup-llvm.bash
deleted file mode 100755
index 5a55902..0000000
--- a/docker/debian-dev/bootstrap/extra/setup-llvm.bash
+++ /dev/null
@@ -1,16 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-LLVM_VERSION=18
-wget https://apt.llvm.org/llvm.sh
-chmod +x llvm.sh
-./llvm.sh $LLVM_VERSION all
-rm llvm.sh
-update-alternatives --install /usr/bin/clang clang /usr/bin/clang-$LLVM_VERSION 100 \
- --slave /usr/bin/clang++ clang++ /usr/bin/clang++-$LLVM_VERSION \
- --slave /usr/bin/clangd clangd /usr/bin/clangd-$LLVM_VERSION \
- --slave /usr/bin/clang-format clang-format /usr/bin/clang-format-$LLVM_VERSION \
- --slave /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-$LLVM_VERSION \
- --slave /usr/bin/lldb lldb /usr/bin/lldb-$LLVM_VERSION \
- --slave /usr/bin/lld lld /usr/bin/lld-$LLVM_VERSION
diff --git a/docker/debian-dev/bootstrap/func.bash b/docker/debian-dev/bootstrap/func.bash
deleted file mode 100644
index fb2ee77..0000000
--- a/docker/debian-dev/bootstrap/func.bash
+++ /dev/null
@@ -1,15 +0,0 @@
-is_true() {
- if [[ "$1" =~ 1|on|true ]]; then
- return 0
- else
- return 1
- fi
-}
-
-append-bash-profile() {
- cat "/bootstrap/bash-profile/$1" >> /root/.bash_profile
-}
-
-copy-home-dot-file() {
- cp "/bootstrap/home-dot/$1" "/root/.$1"
-}
diff --git a/docker/debian-dev/bootstrap/home-dot/devscripts b/docker/debian-dev/bootstrap/home-dot/devscripts
deleted file mode 100644
index a15b041..0000000
--- a/docker/debian-dev/bootstrap/home-dot/devscripts
+++ /dev/null
@@ -1 +0,0 @@
-export DGET_VERIFY=no \ No newline at end of file
diff --git a/docker/debian-dev/bootstrap/home-dot/quiltrc-dpkg b/docker/debian-dev/bootstrap/home-dot/quiltrc-dpkg
deleted file mode 100644
index e8fc3c5..0000000
--- a/docker/debian-dev/bootstrap/home-dot/quiltrc-dpkg
+++ /dev/null
@@ -1,13 +0,0 @@
-d=.
-while [ ! -d $d/debian -a `readlink -e $d` != / ];
- do d=$d/..; done
-if [ -d $d/debian ] && [ -z $QUILT_PATCHES ]; then
- # if in Debian packaging tree with unset $QUILT_PATCHES
- QUILT_PATCHES="debian/patches"
- QUILT_PATCH_OPTS="--reject-format=unified"
- QUILT_DIFF_ARGS="-p ab --no-timestamps --no-index --color=auto"
- QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index"
- QUILT_COLORS="diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:"
- QUILT_COLORS="${QUILT_COLORS}diff_ctx=35:diff_cctx=33"
- if ! [ -d $d/debian/patches ]; then mkdir $d/debian/patches; fi
-fi
diff --git a/docker/debian-dev/bootstrap/setup-base.bash b/docker/debian-dev/bootstrap/setup-base.bash
deleted file mode 100755
index 68ebb55..0000000
--- a/docker/debian-dev/bootstrap/setup-base.bash
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-. /bootstrap/func.bash
-
-apt-get install -y locales vim less man bash-completion rsync curl wget
-
-localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
-
-append-bash-profile bash-completion.bash
diff --git a/docker/debian-dev/bootstrap/setup-code-server.bash b/docker/debian-dev/bootstrap/setup-code-server.bash
deleted file mode 100755
index cb9a407..0000000
--- a/docker/debian-dev/bootstrap/setup-code-server.bash
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-. /bootstrap/func.bash
-
-VERSION=$(curl -s https://api.github.com/repos/coder/code-server/releases/latest | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/')
-url="https://github.com/coder/code-server/releases/download/v${VERSION}/code-server_${VERSION}_amd64.deb"
-
-curl -sSfOL "$url"
-apt install "./code-server_${VERSION}_amd64.deb"
-rm "code-server_${VERSION}_amd64.deb"
-
-append-bash-profile code-server.bash
diff --git a/docker/debian-dev/bootstrap/setup-dev.bash b/docker/debian-dev/bootstrap/setup-dev.bash
deleted file mode 100755
index a2f2f52..0000000
--- a/docker/debian-dev/bootstrap/setup-dev.bash
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-. /bootstrap/func.bash
-
-apt-get install -y build-essential git devscripts debhelper quilt \
- cpio kmod bc python bison flex libelf-dev libssl-dev libncurses-dev dwarves
-
-append-bash-profile dquilt.bash
-copy-home-dot-file devscripts
-copy-home-dot-file quiltrc-dpkg
diff --git a/docker/debian-dev/bootstrap/setup-user.bash b/docker/debian-dev/bootstrap/setup-user.bash
deleted file mode 100755
index 0eccde4..0000000
--- a/docker/debian-dev/bootstrap/setup-user.bash
+++ /dev/null
@@ -1,9 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-apt-get install -y sudo
-
-sed -i.bak 's|%sudo[[:space:]]\+ALL=(ALL:ALL)[[:space:]]\+ALL|%sudo ALL=(ALL:ALL) NOPASSWD: ALL|' /etc/sudoers
-
-useradd -m -G sudo -s /usr/bin/bash "$USERNAME"
diff --git a/docker/debian-dev/bootstrap/setup.bash b/docker/debian-dev/bootstrap/setup.bash
deleted file mode 100755
index f00c60b..0000000
--- a/docker/debian-dev/bootstrap/setup.bash
+++ /dev/null
@@ -1,20 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-export DEBIAN_FRONTEND=noninteractive
-
-/bootstrap/apt-source/setup.bash
-
-apt-get update
-
-/bootstrap/setup-user.bash
-/bootstrap/setup-base.bash
-/bootstrap/setup-dev.bash
-
-if is_true "$SETUP_CODE_SERVER"; then
- /bootstrap/setup-code-server.bash
-fi
-
-
-rm -rf /var/lib/apt/lists/*