You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
279 B
19 lines
279 B
#!/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"
|