Skip to content

Instantly share code, notes, and snippets.

@pulsejet
Created November 17, 2019 18:32
Show Gist options
  • Save pulsejet/6bde26ab24dea576cf9858eb35ec3dcc to your computer and use it in GitHub Desktop.
Save pulsejet/6bde26ab24dea576cf9858eb35ec3dcc to your computer and use it in GitHub Desktop.
Create a deployment archive from NextCloud app git repo folder
#!/bin/bash
# Name of app
APP="oidc_login"
# Name of git repo folder
GITREPO="oidc_git"
# Remove existing
rm -rf $APP/
cp -R $GITREPO/ $APP
# Remove .git folder
cd $APP/
rm -rf .git
cd ..
# Compress
tar -czf $APP.tar.gz $APP/
# Get signature
openssl dgst -sha512 -sign ~/.nextcloud/certificates/$APP.key ./$APP.tar.gz | openssl base64
# Move to another location or do something else
# mv $APP.tar.gz /var/www/html/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment