1
0
Fork 1
mirror of https://example.com synced 2024-11-22 21:06:38 +09:00

dev: support Podman

This commit is contained in:
naskya 2024-01-05 08:03:42 +09:00
parent 8d044c617d
commit d7d9e3c323
Signed by: naskya
GPG key ID: 712D413B3A9FED5C
2 changed files with 10 additions and 7 deletions

View file

@ -5,16 +5,16 @@ set -eu
pull() { pull() {
say 'Pulling the image...' say 'Pulling the image...'
run 'docker pull registry.code.naskya.net/naskya/firefish' run "$1 pull registry.code.naskya.net/naskya/firefish"
} }
if ! pull; then if ! pull "$1"; then
say 'awawa, the image may not be compatible with your environment...' say 'awawa, the image may not be compatible with your environment...'
say 'Gonnya try building the image locally!' say 'Gonnya try building the image locally!'
say 'It takes some time! Why not brew a cup of cofe?' say 'It takes some time! Why not brew a cup of cofe?'
run "$(cat - << EOC run "$(cat - << EOC
docker build --tag registry.code.naskya.net/naskya/firefish --build-arg VERSION="$(version)" . $1 build --tag registry.code.naskya.net/naskya/firefish --build-arg VERSION="$(version)" .
EOC EOC
)" )"
fi fi

View file

@ -74,13 +74,16 @@ for message in neko/messages/*; do
esac esac
done done
say 'Do you use Docker?' say 'Do you use Docker or Podman?'
printf '[y/N] > ' printf '(d: Docker, p: Podman, n: No) [d/p/N] > '
read -r yn read -r yn
case "${yn}" in case "${yn}" in
[Yy]|[Yy][Ee][Ss]) [Dd])
./neko/update/docker.sh "$@" ./neko/update/docker.sh 'docker' "$@"
;;
[Pp])
./neko/update/docker.sh 'podman' "$@"
;; ;;
*) *)
./neko/update/native.sh "$@" ./neko/update/native.sh "$@"