-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild-dev.sh
executable file
·30 lines (23 loc) · 987 Bytes
/
build-dev.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
set -euxo pipefail
DIR="$(cd "$(dirname "$0")" && pwd)"
"$DIR/build-common.sh"
source "$DIR/utils.sh"
cat >> ~/.bashrc <<EOF
if [ -z "\$BUILD_VERSION_CHECK_DONE" ] && ! diff -q "$DIR" ".devcontainer/" > /dev/null; then
echo -e "\e[1m\e[31mThis container is outdated. Please rebuild.\e[0m" > /dev/stderr
fi
export BUILD_VERSION_CHECK_DONE=true
EOF
# Make sure a few common tools are installed
apt-get update
apt-get upgrade -y
apt-get install -y --no-install-recommends curl gettext git gnupg less procps apt-utils locales
# This fixed the locale and is required for diff-so-fancy
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen en_US.UTF-8
# Install diff-so-fancy
DIFF_SO_FANCY_VERSION="1.2.6"
download https://raw.githubusercontent.com/so-fancy/diff-so-fancy/v${DIFF_SO_FANCY_VERSION}/third_party/build_fatpack/diff-so-fancy \
ed9de2669c789d1aba8456d0a7cf95adb326e220c99af4336405f21add8f0852 /usr/bin/diff-so-fancy
chmod a+x /usr/bin/diff-so-fancy