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 /