Make ship pier dir configurable in remote deployment script
This commit is contained in:
parent
f09d13cc2a
commit
37a1b21fcd
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# $1: Glob file URL (eg. https://xyz.com/glob-abcd.glob)
|
# $1: Glob file URL (eg. https://xyz.com/glob-abcd.glob)
|
||||||
# $2: Uniswap desk dir (default: ./zod/uniswap)
|
# $2: Urbit ship's pier dir (default: ./zod)
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
echo "Glob file URL arg not provided"
|
echo "Glob file URL arg not provided"
|
||||||
@ -13,8 +13,10 @@ glob_file=$(basename "$glob_url")
|
|||||||
glob_hash=$(echo "$glob_file" | sed "s/glob-\([a-z0-9\.]*\).glob/\1/")
|
glob_hash=$(echo "$glob_file" | sed "s/glob-\([a-z0-9\.]*\).glob/\1/")
|
||||||
echo "Using glob file ${glob_file}"
|
echo "Using glob file ${glob_file}"
|
||||||
|
|
||||||
|
# Default pier dir: ./zod
|
||||||
# Default desk dir: ./zod/uniswap
|
# Default desk dir: ./zod/uniswap
|
||||||
uniswap_desk_dir="${2:-./zod/uniswap}"
|
pier_dir="${2:-./zod}"
|
||||||
|
uniswap_desk_dir="${pier_dir}/uniswap"
|
||||||
|
|
||||||
echo "Using ${uniswap_desk_dir} as the Uniswap desk dir path"
|
echo "Using ${uniswap_desk_dir} as the Uniswap desk dir path"
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# $1: Remote user host
|
# $1: Remote user host
|
||||||
# $2: Path to run the app installation in (where urbit ship dir is located)
|
# $2: Remote Urbit ship's pier dir path (eg. /home/user/zod)
|
||||||
# $3: Glob file URL (eg. https://xyz.com/glob-abcd.glob)
|
# $3: Glob file URL (eg. https://xyz.com/glob-abcd.glob)
|
||||||
|
|
||||||
if [ "$#" -ne 3 ]; then
|
if [ "$#" -ne 3 ]; then
|
||||||
echo "Usage: $0 <username@remote_host> </path/to/remote/folder> <glob_url>"
|
echo "Usage: $0 <username@remote_host> </path/to/remote/pier/folder> <glob_url>"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
remote_user_host="$1"
|
remote_user_host="$1"
|
||||||
remote_folder="$2"
|
remote_pier_folder="$2"
|
||||||
glob_url="$3"
|
glob_url="$3"
|
||||||
|
|
||||||
installation_script="./install-uniswap-app.sh"
|
installation_script="./install-uniswap-app.sh"
|
||||||
|
|
||||||
ssh "$remote_user_host" "cd $remote_folder && bash -s $glob_url" < "$installation_script"
|
ssh "$remote_user_host" "bash -s $glob_url $remote_pier_folder" < "$installation_script"
|
||||||
|
Loading…
Reference in New Issue
Block a user