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

2 years ago
  1. #!/bin/bash
  2. # ./sh/deploy.sh username ip
  3. set -e
  4. if [ $# -ne 2 ]; then
  5. echo "Usage: ./sh/deploy.sh username ip"
  6. exit 1
  7. fi
  8. # 1. Build
  9. ./sh/build.sh
  10. cd build
  11. make -j8 install
  12. tar -cvf app.tar app
  13. scp app.tar $1@$2:/home/$1/
  14. ssh $1@$2 "cd /home/$1/ && tar -xvf app.tar"