Skip to content

Commit 8bfba67

Browse files
bootstrap: detect when dotfiles running on qemu
1 parent d713e62 commit 8bfba67

6 files changed

Lines changed: 29 additions & 0 deletions

File tree

install/bootstrap_apps.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
source "${BOOSTRAP_DIR}/bootstrap_apps_cli.sh"
22

3+
if test "$BOOTSTRAP_SKIP_APPS_OS_ENVIRONMENT_INSTALL" = "0"; then
4+
message_info_show "Skip OS Environment installation"
5+
else
6+
source "${BOOSTRAP_DIR}/bootstrap_apps_os_environment.sh"
7+
fi
8+
39
if test "$BOOTSTRAP_SKIP_APPS_GUI_INSTALL" = "0"; then
410
message_info_show "Skip GUI apps installion"
511
else
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# OS environment
2+
3+
if is_profile_admin_or_similar; then
4+
if qemu_is_running; then
5+
:
6+
#is_cli_priority "critical" && is_archl && archlinux_pacman_aur_install ""
7+
fi
8+
fi
9+

install/bootstrap_archlinux.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ source "${BOOSTRAP_DIR}/common/shell/tmux.sh"
3030
source "${BOOSTRAP_DIR}/common/shell/sudo.sh"
3131
source "${BOOSTRAP_DIR}/common/shell/user_password.sh"
3232
source "${BOOSTRAP_DIR}/common/shell/container.sh"
33+
source "${BOOSTRAP_DIR}/common/shell/qemu.sh"
3334
source "${BOOSTRAP_DIR}/common/shell/systemd.sh"
3435
source "${BOOSTRAP_DIR}/common/shell/ci.sh"
3536
source "${BOOSTRAP_DIR}/common/shell/vscode.sh"

install/bootstrap_fedora.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ source "${BOOSTRAP_DIR}/common/shell/tmux.sh"
3030
source "${BOOSTRAP_DIR}/common/shell/sudo.sh"
3131
source "${BOOSTRAP_DIR}/common/shell/user_password.sh"
3232
source "${BOOSTRAP_DIR}/common/shell/container.sh"
33+
source "${BOOSTRAP_DIR}/common/shell/qemu.sh"
3334
source "${BOOSTRAP_DIR}/common/shell/systemd.sh"
3435
source "${BOOSTRAP_DIR}/common/shell/ci.sh"
3536
source "${BOOSTRAP_DIR}/common/shell/vscode.sh"

install/bootstrap_macos.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ source "${BOOSTRAP_DIR}/common/shell/tmux.sh"
2929
source "${BOOSTRAP_DIR}/common/shell/sudo.sh"
3030
source "${BOOSTRAP_DIR}/common/shell/user_password.sh"
3131
source "${BOOSTRAP_DIR}/common/shell/container.sh"
32+
source "${BOOSTRAP_DIR}/common/shell/qemu.sh"
3233
source "${BOOSTRAP_DIR}/common/shell/systemd.sh"
3334
source "${BOOSTRAP_DIR}/common/shell/ci.sh"
3435
source "${BOOSTRAP_DIR}/common/shell/vscode.sh"

install/common/shell/qemu.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
qemu_is_running() {
2+
if grep -qi "QEMU" /sys/class/dmi/id/product_name; then
3+
return 0
4+
elif grep -qi "QEMU" /proc/cpuinfo; then
5+
return 0
6+
elif command -v virt-what >/dev/null && [[ $(virt-what) == "qemu" ]]; then
7+
return 0
8+
else
9+
return 1
10+
fi
11+
}

0 commit comments

Comments
 (0)