2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 01:22:00 +00:00

Add arguments to the run_remote functions

This will help provide flexibility in invoking remote scripts
without hardcoding arguments into the scripts
This commit is contained in:
Jarrod Johnson 2020-07-13 17:08:38 -04:00
parent 2ec0c1366e
commit 910490cc74
3 changed files with 9 additions and 6 deletions

View File

@ -2,13 +2,14 @@ run_remote() {
cd $(mktemp -d)
curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1
chmod +x $1
./$1
cmd=$(shift)
./$cmd $*
cd -
}
run_remote_python() {
cd $(mktemp -d)
curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1
/usr/libexec/platform-python $1
/usr/libexec/platform-python $*
cd -
}

View File

@ -2,13 +2,14 @@ run_remote() {
cd $(mktemp -d)
curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1
chmod +x $1
./$1
cmd=$(shift)
./$cmd $*
cd -
}
run_remote_python() {
cd $(mktemp -d)
curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1
/usr/libexec/platform-python $1
/usr/libexec/platform-python $*
cd -
}

View File

@ -2,13 +2,14 @@ run_remote() {
cd $(mktemp -d)
curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1
chmod +x $1
./$1
cmd=$(shift)
./$cmd $*
cd -
}
run_remote_python() {
cd $(mktemp -d)
curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1
python3 $1
python3 $*
cd -
}