Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .github/.devcontainer/chrome/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,31 @@ elif [ "${USERNAME}" = "none" ] || ! id -u "${USERNAME}" >/dev/null 2>&1; then
USERNAME=root
fi

apt_get_update() {
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
echo "Running apt-get update..."
apt-get update -y
fi
}

# Checks if packages are installed and installs them if not
check_packages() {
if ! dpkg -s "$@" >/dev/null 2>&1; then
apt_get_update
apt-get -y install --no-install-recommends "$@"
fi
}

install_chrome() {
local arch="$(dpkg --print-architecture)"
local arch="$1"
check_packages wget gnupg
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
echo "deb [arch=${arch}] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google.list
check_packages google-chrome-stable
}

install_chrome ${arch}

apt-get clean && rm -rf /var/lib/apt/lists/*

echo "Done!"
19 changes: 19 additions & 0 deletions .github/.devcontainer/decktape/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,21 @@ elif [ "${USERNAME}" = "none" ] || ! id -u "${USERNAME}" >/dev/null 2>&1; then
USERNAME=root
fi

apt_get_update() {
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
echo "Running apt-get update..."
apt-get update -y
fi
}

# Checks if packages are installed and installs them if not
check_packages() {
if ! dpkg -s "$@" >/dev/null 2>&1; then
apt_get_update
apt-get -y install --no-install-recommends "$@"
fi
}

install_decktape() {
local version=$1
local url="https://deb.nodesource.com/setup_${version}.x "
Expand All @@ -39,4 +54,8 @@ install_decktape() {
npm install -g decktape
}

install_decktape ${VERSION}

apt-get clean && rm -rf /var/lib/apt/lists/*

echo "Done!"
16 changes: 10 additions & 6 deletions .github/.devcontainer/tinytex/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,16 @@ check_packages() {
fi
}

echo "Installing TinyTeX..."
check_packages libfontconfig
# su "${USERNAME}" -c 'quarto install tinytex --quiet'
check_packages curl ca-certificates
su "${USERNAME}" -c 'curl -sL "https://yihui.org/tinytex/install-bin-unix.sh" | sh'
echo "TinyTeX installation complete."
install_tinytex() {
echo "Installing TinyTeX..."
check_packages libfontconfig
# su "${USERNAME}" -c 'quarto install tinytex --quiet'
check_packages curl ca-certificates
su "${USERNAME}" -c 'curl -sL "https://yihui.org/tinytex/install-bin-unix.sh" | sh'
echo "TinyTeX installation complete."
}

install_tinytex

apt-get clean && rm -rf /var/lib/apt/lists/*

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
ANNOTATION_URL: ${{ github.server_url }}/${{ github.repository }}
ANNOTATION_LICENSE: "MIT"
- name: Test Dev Container
if: ${{ github.event_name == 'release' }}
env:
QUARTO_VERSION: ${{ matrix.QUARTO_VERSION }}
run: |
Expand Down