diff --git a/neko/update/docker.sh b/neko/update/docker.sh index 2abda049..6af3f41a 100755 --- a/neko/update/docker.sh +++ b/neko/update/docker.sh @@ -5,16 +5,16 @@ set -eu pull() { 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 'Gonnya try building the image locally!' say 'It takes some time! Why not brew a cup of cofe?' 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 )" fi diff --git a/update.sh b/update.sh index c572fb5a..f6bbfca8 100755 --- a/update.sh +++ b/update.sh @@ -74,13 +74,16 @@ for message in neko/messages/*; do esac done -say 'Do you use Docker?' -printf '[y/N] > ' +say 'Do you use Docker or Podman?' +printf '(d: Docker, p: Podman, n: No) [d/p/N] > ' read -r yn case "${yn}" in - [Yy]|[Yy][Ee][Ss]) - ./neko/update/docker.sh "$@" + [Dd]) + ./neko/update/docker.sh 'docker' "$@" + ;; + [Pp]) + ./neko/update/docker.sh 'podman' "$@" ;; *) ./neko/update/native.sh "$@"