Compare commits
3 commits
9486b8cdcc
...
8b5109d1e4
Author | SHA1 | Date | |
---|---|---|---|
8b5109d1e4 | |||
f6da6444f6 | |||
e801093e13 |
3 changed files with 3 additions and 3 deletions
2
Makefile
2
Makefile
|
@ -37,5 +37,5 @@ $(DST_BIN): $(SRC_BIN)
|
||||||
$(DST_MODULES): $(DST_HOME)%: $(SRC_HOME)%
|
$(DST_MODULES): $(DST_HOME)%: $(SRC_HOME)%
|
||||||
sudo -u $(QEMU_USER) install -m 740 -- $^ $@
|
sudo -u $(QEMU_USER) install -m 740 -- $^ $@
|
||||||
|
|
||||||
$(LAUNCHERS): $(DST_LAUNCHERSD)%: $(SRC_LAUNCHERSD)%
|
$(DST_LAUNCHERS): $(DST_LAUNCHERSD)%: $(SRC_LAUNCHERSD)%
|
||||||
sudo -u $(QEMU_USER) install -m 740 -- $^ $@
|
sudo -u $(QEMU_USER) install -m 740 -- $^ $@
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
# version=0.11.0
|
# version=1.0.0
|
||||||
|
|
||||||
# Re-exec the script as qemu via sudo (only if needed)
|
# Re-exec the script as qemu via sudo (only if needed)
|
||||||
[ "$(whoami)" != qemu ] && exec sudo -E -H -u qemu -- "$0" "$@"
|
[ "$(whoami)" != qemu ] && exec sudo -E -H -u qemu -- "$0" "$@"
|
||||||
|
|
|
@ -13,7 +13,7 @@ esac
|
||||||
[ -z "$QEMUSH_NPROC" ] && QEMUSH_NPROC=$(($(nproc) / 2))
|
[ -z "$QEMUSH_NPROC" ] && QEMUSH_NPROC=$(($(nproc) / 2))
|
||||||
|
|
||||||
# How much RAM to use
|
# How much RAM to use
|
||||||
[ -z "$QEMUSH_RAM" ] && QEMUSH_RAM=$(($(free | grep '^Mem:\s' | awk '{ print $NF }') / 2))K
|
[ -z "$QEMUSH_RAM" ] && QEMUSH_RAM=$(($(grep '^MemAvailable:\s' /proc/meminfo | awk '{ print $2 }') / 2))K
|
||||||
|
|
||||||
# Use selected QEMUSH_MACHINE type if set
|
# Use selected QEMUSH_MACHINE type if set
|
||||||
[ -n "$QEMUSH_MACHINE" ] && set -- -M "$QEMUSH_MACHINE" "$@"
|
[ -n "$QEMUSH_MACHINE" ] && set -- -M "$QEMUSH_MACHINE" "$@"
|
||||||
|
|
Loading…
Reference in a new issue