added dev dependencies and aseprite to dev container
This commit is contained in:
@@ -4,12 +4,15 @@ set -euo pipefail
|
||||
|
||||
echo "Initializing development environment..."
|
||||
|
||||
export DEV_HOME="$HOME"
|
||||
export DEV_USER="$(basename "$DEV_HOME")"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Rust directories
|
||||
# Software directories
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
mkdir -p /opt/rustup /opt/cargo
|
||||
chown "$(id -u):$(id -g)" /opt/rustup /opt/cargo
|
||||
mkdir -p /opt/rustup /opt/cargo /opt/aseprite
|
||||
chown "$DEV_USER:$DEV_USER" /opt/rustup /opt/cargo /opt/aseprite
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Fish configuration
|
||||
@@ -40,32 +43,47 @@ curl \
|
||||
https://sh.rustup.rs \
|
||||
| sh -s -- -y --no-modify-path
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Rust toolchain
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
echo "Installing stable Rust toolchain..."
|
||||
|
||||
/opt/cargo/bin/rustup default stable
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Fish completions
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
echo "Installing rustup Fish completion..."
|
||||
|
||||
/opt/cargo/bin/rustup completions fish \
|
||||
| tee /etc/fish/completions/rustup.fish >/dev/null
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Export Rust development tools to the host
|
||||
# Aseprite
|
||||
# -----------------------------------------------------------------------------
|
||||
echo "Building Aseprite..."
|
||||
git clone --recursive https://github.com/aseprite/aseprite.git /opt/aseprite
|
||||
cd /opt/aseprite
|
||||
./build.sh --auto --norun
|
||||
|
||||
echo "Creating Aseprite desktop entry..."
|
||||
cat > /opt/aseprite/aseprite.desktop <<'EOF'
|
||||
[Desktop Entry]
|
||||
Name=Aseprite
|
||||
Comment=Animated sprite editor
|
||||
Exec=/opt/aseprite/build/bin/aseprite %F
|
||||
Icon=/opt/aseprite/build/bin/data/icons/ase.ico
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Graphics;2DGraphics;
|
||||
EOF
|
||||
|
||||
echo "Exporting Aseprite desktop entry..."
|
||||
sudo -u "$DEV_USER" env HOME="$DEV_HOME" distrobox-export --app /opt/aseprite/aseprite.desktop
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Export development tools to the host
|
||||
# -----------------------------------------------------------------------------
|
||||
export PATH="/opt/cargo/bin:$PATH"
|
||||
echo "Exporting development tools..."
|
||||
|
||||
DEV_HOME="$HOME"
|
||||
DEV_USER="$(basename "$DEV_HOME")"
|
||||
|
||||
export_bin() {
|
||||
local binary="$1"
|
||||
|
||||
@@ -105,6 +123,7 @@ done
|
||||
export_bin clang
|
||||
export_bin clang++
|
||||
export_bin cmake
|
||||
export_bin ninja
|
||||
export_bin lld
|
||||
export_bin ld.lld
|
||||
export_bin gdb
|
||||
|
||||
Reference in New Issue
Block a user