From 72a68d042b98de884c22a90314d125d46dc3b781 Mon Sep 17 00:00:00 2001 From: jane400 Date: Thu, 23 Jan 2025 16:29:13 +0100 Subject: [PATCH] feat: prod cli switch --- copy.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/copy.sh b/copy.sh index 1ee40c1..09e309e 100755 --- a/copy.sh +++ b/copy.sh @@ -1,5 +1,11 @@ #!/bin/ash +_target_domain="cutei.j4ne.de" +if [ "$1" == "prod" ]; then + _target_domain="prod.cloud.j4ne.de" +fi +# TODO: track deleted files or convert to APKBUILD + _source644=" etc/apk/world etc/caddy/Caddyfile @@ -48,5 +54,5 @@ cd "$pkgdir" tar -czf "$result" * cd "$startdir" -scp "$result" root@prod.cloud.j4ne.de:/root/files.tar.gz -ssh root@prod.cloud.j4ne.de tar -xf '~/files.tar.gz' --no-same-owner -C / +scp "$result" root@"$_target_domain":/root/files.tar.gz +ssh root@"$_target_domain" tar -xf '~/files.tar.gz' --no-same-owner -C /