Clean up convenience functions

This commit is contained in:
Thomas Lovén 2022-01-04 21:55:44 +01:00
parent d6025a1db7
commit d69a047172
3 changed files with 26 additions and 5 deletions

9
dbg
View File

@ -1,6 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
default="gdb -q -x /opt/toolchain/gdbinit" default="gdb \
-q \
-x /opt/toolchain/gdbinit\
"
if [[ "$1" == "-" ]]; then if [[ "$1" == "-" ]]; then
shift shift
@ -9,4 +12,6 @@ else
cmd="${default} $@" cmd="${default} $@"
fi fi
docker-compose -f toolchain/docker-compose.yml run --rm -u $(id -u):$(id -g) run ${cmd} docker-compose -f toolchain/docker-compose.yml run \
--rm \
run ${cmd}

17
emu
View File

@ -1,6 +1,16 @@
#!/usr/bin/env bash #!/usr/bin/env bash
default="qemu-system-x86_64 -s -S -cdrom /opt/mittos.iso -curses" default="qemu-system-x86_64 \
-s -S \
-drive file=/opt/mittos.iso,media=cdrom,cache=none \
-curses \
"
if [[ "$1" == "nocompile" ]]; then
shift
else
make dist
fi
if [[ "$1" == "-" ]]; then if [[ "$1" == "-" ]]; then
shift shift
@ -9,4 +19,7 @@ else
cmd="${default} $@" cmd="${default} $@"
fi fi
docker-compose -f toolchain/docker-compose.yml run --rm --name emul -u $(id -u):$(id -g) run ${cmd} docker-compose -f toolchain/docker-compose.yml run \
--rm \
--name emul \
run ${cmd}

5
make
View File

@ -9,4 +9,7 @@ else
cmd="${default} $@" cmd="${default} $@"
fi fi
docker-compose -f toolchain/docker-compose.yml run --rm -u $(id -u):$(id -g) build ${cmd} docker-compose -f toolchain/docker-compose.yml run \
--rm \
-u $(id -u):$(id -g) \
build ${cmd}