19 lines
567 B
Bash
Executable File
19 lines
567 B
Bash
Executable File
#!/bin/bash
|
|
|
|
#USERNAME= vps sign in
|
|
#VPS_PASSWORD= vps password
|
|
#VPS_USERNAME= user name inside vps
|
|
#API_KEY= $(cat path/to/api/token/file)
|
|
|
|
|
|
if [[ -z "$1" ]]; then
|
|
echo "Must provide plugin name in environment" 1>&2
|
|
exit 1
|
|
fi
|
|
|
|
PLUGIN_NAME=$1
|
|
|
|
API_KEY=$API_KEY make
|
|
tar czf - ./config.json ./bundle.js ./local.js ./main.css ./main.html | ssh $USERNAME -p $VPS_PASSWORD "cd plugins && mkdir $PLUGIN_NAME && cd $PLUGIN_NAME && tar xvzf -"
|
|
ssh -t $USERNAME -p $VPS_PASSWORD "sudo ln -s /home/$VPS_USERNAME/plugins/$PLUGIN_NAME /home/ozbolt/plugins/$PLUGIN_NAME"
|