#!/bin/bash # ./sh/deploy.sh username ip set -e if [ $# -ne 2 ]; then echo "Usage: ./sh/deploy.sh username ip" exit 1 fi # 1. Build ./sh/build.sh cd build make -j8 install tar -cvf app.tar app scp app.tar $1@$2:/home/$1/ ssh $1@$2 "cd /home/$1/ && tar -xvf app.tar"