commit 322c533da9b9a7596410089ab16d823c61cedcd2
parent 60018f4e92920eee6010c0565a8e0f37ddb61337
Author: Josuah Demangeon <mail@josuah.net>
Date: Tue, 3 Apr 2018 15:56:42 +0200
qemu service to start VMs
Diffstat:
8 files changed, 40 insertions(+), 10 deletions(-)
diff --git a/.ssh/config b/.ssh/config
@@ -1,4 +1,6 @@
-AddKeysToAgent yes
+host *
+ AddKeysToAgent yes
+ ForwardX11 yes
host ::1
IdentityFile /mnt/key/josuah.key
diff --git a/bin/git-mirror b/bin/git-mirror
@@ -0,0 +1,17 @@
+#!/bin/sh -e
+
+host="$1"
+
+: ${host:?}
+
+mkdir -p "$HOME/var/git"
+cd "$HOME/var/git"
+
+while read -r repo
+do
+ git clone --separate-git-dir="$HOME/var/$repo.git" \
+ "$host/$repo.git" "$HOME/git/$host/$repo.git"
+ mkdir -p "$HOME/git/$host
+ cd "$HOME/git/$host/$repo"
+ git init
+done
diff --git a/bin/io b/bin/io
@@ -17,8 +17,6 @@ fi
h='----------------------------------------------------------------------------'
-echo "$DISPLAY" >~/out
-
exec xdg-open "$({
xdg-abduco
printf '#%s\n' "$h$h$h$h$h$h$h$h$h$h$h$hh$h$h"
diff --git a/bin/qemu b/bin/qemu
@@ -6,7 +6,8 @@ path="$2"
: ${port:?} ${path:?}
exec qemu-system-x86_64 \
+ -m 400M \
-device "e1000,netdev=net0" \
-netdev "user,id=net0,hostfwd=tcp::$port-:22" \
-display "none" \
- "$path" &
+ "$path"
diff --git a/bin/xdg-abduco b/bin/xdg-abduco
@@ -20,7 +20,7 @@ for name in "$@"; do continue; done
# get the real path name
[ ! -h "$name" ] || name="$(readlink -f "$name")"
[ ! -e "$name" ] || name="$(cd "$(dirname "$name")"; pwd)/$(basename "$name")"
-[ ! -d "$name" ] || name="$1" "$(cd "$name"; pwd)"
+[ ! -d "$name" ] || name="$name" "$(cd "$name"; pwd)"
case "$#" in
(0)
@@ -30,7 +30,7 @@ case "$#" in
printf '\033]0;%s\a' "$2" 1>&2
hash="$(printf %s "$name" | cksum | cut -d ' ' -f 1)"
- printf '%s\t%s\n' "$hash" "$2" >> "$dir/names"
+ printf '%s\t%s\n' "$hash" "$name" >> "$dir/names"
if [ "$ABDUCO" ]
then
diff --git a/bin/xdg-open b/bin/xdg-open
@@ -159,7 +159,7 @@ case "$1" in
exec ffplay -loop 0 "$1"
;;
(*.opus|*.mp3|*.flac|*.ogg|*.vorbis|*.wav|*.webm|*.mp4|*.mkv|*.ogv|*.avi)
- exec ffplay "$1"
+ exec xdg-abduco ffplay "$1"
;;
(*/music/*)
xdg-abduco playdir "$1"
diff --git a/run/qemu/run b/run/qemu/run
@@ -0,0 +1,14 @@
+#!/bin/sh -e
+
+exec 2>&1
+
+IFS='' read -r port <port
+IFS='' read -r path <path
+IFS='' read -r mem <mem
+
+exec qemu-system-x86_64 \
+ -m "$mem" \
+ -device "e1000,netdev=net0" \
+ -netdev "user,id=net0,hostfwd=tcp::$port-:22" \
+ -display "none" \
+ "$path"
diff --git a/run/quark/run b/run/quark/run
@@ -1,12 +1,10 @@
#!/bin/sh -e
-port="80"
-
exec 2>&1
IFS='' read path <path
-exec quark -l -h 0.0.0.0 -p "$port" -d "$path" \
+exec quark -l -h 0.0.0.0 -p 80 -d "$path" \
-v 'josuah.net josuah\.net$ josuah.net' \
-v 'cyberia.systems cyberia\.systems$ cyberia.systems' \
-v 'www.atelier-fu.fr atelier-fu\.fr$ atelier-fu.fr'