-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·40 lines (34 loc) · 1.8 KB
/
install.sh
File metadata and controls
executable file
·40 lines (34 loc) · 1.8 KB
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
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
### Dotfiles (iam) project v1.2.0
### https://github.com/Jacke/-
### Container/Codespaces Entry Point
### Copyright 2020-2025
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# ═══════════════════════════════════════════════════════════════════════════════
# CONTAINER DETECTION
# ═══════════════════════════════════════════════════════════════════════════════
detect_container() {
if [[ -n "${CODESPACES:-}" ]] ||
[[ -n "${REMOTE_CONTAINERS:-}" ]] ||
[[ -n "${CONTAINER:-}" ]] ||
[[ "${DOCKER:-0}" -eq 1 ]] ||
[[ -f /.dockerenv ]] ||
[[ -f /run/.containerenv ]]; then
return 0
fi
return 1
}
if detect_container; then
export CONTAINER=1
export DOTFILES_SOURCE_DIR="$SCRIPT_DIR"
export INSTALL_COMMON="$SCRIPT_DIR/scripts/dotfiles/executable_install-common.sh"
fi
# ═══════════════════════════════════════════════════════════════════════════════
# DELEGATE TO OS-SPECIFIC INSTALLER
# ═══════════════════════════════════════════════════════════════════════════════
if [[ "$OSTYPE" == darwin* ]]; then
exec bash "$SCRIPT_DIR/scripts/dotfiles/executable_install-mac.sh"
else
exec bash "$SCRIPT_DIR/scripts/dotfiles/executable_install-linux.sh"
fi