#!/bin/bash if [[ "$1" == "help" ]]; then echo "Please format the command like this: container-upload " exit fi tag=$(echo $1 | grep -o -P "(:(?P[\w.\-_]{1,127})|)$") name=$(echo $1 | grep -o -P "(?<=\/)([a-z0-9._-]+)(?=(:([\w.\-_]{1,127})|)$)") echo uploading $name... sudo docker pull $1 sudo docker tag $1 gitea.henriserverack.com/archive-team/$name$tag sudo docker push gitea.henriserverack.com/archive-team/$name$tag echo uploaded $name to gitea.henriserverack.com/archive-team/$name$tag