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

Further tweaks to postscript library functions

This commit is contained in:
Jarrod Johnson 2020-08-21 17:42:02 -04:00
parent 2e2a34b470
commit 59e739a143
5 changed files with 80 additions and 30 deletions

View File

@ -3,8 +3,11 @@ run_remote() {
echo
echo '---------------------------------------------------------------------------'
echo Running $requestedcmd from https://$mgr/confluent-public/os/$profile/scripts/
cd $(mktemp -d)
tmpdir=$(mktemp -d)
echo Executing in $tmpdir
cd $tmpdir
curl -f -sS https://$mgr/confluent-public/os/$profile/scripts/$1 > $1
if [ $? != 0 ]; then echo $requestedcmd failed to download; return 1; fi
chmod +x $1
cmd=$1
if [ -x /usr/bin/chcon ]; then
@ -12,17 +15,24 @@ run_remote() {
fi
shift
./$cmd $*
echo "$requestedcmd exited with code $?"
cd -
retcode=$?
echo "$requestedcmd exited with code $retcode"
cd - > /dev/null
return $retcode
}
run_remote_python() {
echo
echo '---------------------------------------------------------------------------'
echo Running python script "'$*'" from https://$mgr/confluent-public/os/$profile/scripts/
cd $(mktemp -d)
tmpdir=$(mktemp -d)
echo Executing in $tmpdir
cd $tmpdir
curl -f -sS https://$mgr/confluent-public/os/$profile/scripts/$1 > $1
if [ $? != 0 ]; then echo "'$*'" failed to download; return 1; fi
/usr/libexec/platform-python $*
echo "'$*' exited with code $?"
cd -
retcode=$?
echo "'$*' exited with code $retcode"
cd - > /dev/null
return $retcode
}

View File

@ -3,8 +3,11 @@ run_remote() {
echo
echo '---------------------------------------------------------------------------'
echo Running $requestedcmd from https://$mgr/confluent-public/os/$profile/scripts/
cd $(mktemp -d)
tmpdir=$(mktemp -d)
echo Executing in $tmpdir
cd $tmpdir
curl -f -sS https://$mgr/confluent-public/os/$profile/scripts/$1 > $1
if [ $? != 0 ]; then echo $requestedcmd failed to download; return 1; fi
chmod +x $1
cmd=$1
if [ -x /usr/bin/chcon ]; then
@ -12,17 +15,24 @@ run_remote() {
fi
shift
./$cmd $*
echo "$requestedcmd exited with code $?"
cd -
retcode=$?
echo "$requestedcmd exited with code $retcode"
cd - > /dev/null
return $retcode
}
run_remote_python() {
echo
echo '---------------------------------------------------------------------------'
echo Running python script "'$*'" from https://$mgr/confluent-public/os/$profile/scripts/
cd $(mktemp -d)
tmpdir=$(mktemp -d)
echo Executing in $tmpdir
cd $tmpdir
curl -f -sS https://$mgr/confluent-public/os/$profile/scripts/$1 > $1
if [ $? != 0 ]; then echo "'$*'" failed to download; return 1; fi
/usr/libexec/platform-python $*
echo "'$*' exited with code $?"
cd -
retcode=$?
echo "'$*' exited with code $retcode"
cd - > /dev/null
return $retcode
}

View File

@ -3,8 +3,11 @@ run_remote() {
echo
echo '---------------------------------------------------------------------------'
echo Running $requestedcmd from https://$mgr/confluent-public/os/$profile/scripts/
cd $(mktemp -d)
tmpdir=$(mktemp -d)
echo Executing in $tmpdir
cd $tmpdir
curl -f -sS https://$mgr/confluent-public/os/$profile/scripts/$1 > $1
if [ $? != 0 ]; then echo $requestedcmd failed to download; return 1; fi
chmod +x $1
cmd=$1
if [ -x /usr/bin/chcon ]; then
@ -12,17 +15,24 @@ run_remote() {
fi
shift
./$cmd $*
echo "$requestedcmd exited with code $?"
cd -
retcode=$?
echo "$requestedcmd exited with code $retcode"
cd - > /dev/null
return $retcode
}
run_remote_python() {
echo
echo '---------------------------------------------------------------------------'
echo Running python script "'$*'" from https://$mgr/confluent-public/os/$profile/scripts/
cd $(mktemp -d)
tmpdir=$(mktemp -d)
echo Executing in $tmpdir
cd $tmpdir
curl -f -sS https://$mgr/confluent-public/os/$profile/scripts/$1 > $1
if [ $? != 0 ]; then echo "'$*'" failed to download; return 1; fi
/usr/libexec/platform-python $*
echo "'$*' exited with code $?"
cd -
retcode=$?
echo "'$*' exited with code $retcode"
cd - > /dev/null
return $retcode
}

View File

@ -3,8 +3,11 @@ run_remote() {
echo
echo '---------------------------------------------------------------------------'
echo Running $requestedcmd from https://$mgr/confluent-public/os/$profile/scripts/
cd $(mktemp -d)
tmpdir=$(mktemp -d)
echo Executing in $tmpdir
cd $tmpdir
curl -f -sS https://$mgr/confluent-public/os/$profile/scripts/$1 > $1
if [ $? != 0 ]; then echo $requestedcmd failed to download; return 1; fi
chmod +x $1
cmd=$1
if [ -x /usr/bin/chcon ]; then
@ -12,17 +15,24 @@ run_remote() {
fi
shift
./$cmd $*
echo "$requestedcmd exited with code $?"
cd -
retcode=$?
echo "$requestedcmd exited with code $retcode"
cd - > /dev/null
return $retcode
}
run_remote_python() {
echo
echo '---------------------------------------------------------------------------'
echo Running python script "'$*'" from https://$mgr/confluent-public/os/$profile/scripts/
cd $(mktemp -d)
tmpdir=$(mktemp -d)
echo Executing in $tmpdir
cd $tmpdir
curl -f -sS https://$mgr/confluent-public/os/$profile/scripts/$1 > $1
if [ $? != 0 ]; then echo "'$*'" failed to download; return 1; fi
/usr/libexec/platform-python $*
echo "'$*' exited with code $?"
cd -
retcode=$?
echo "'$*' exited with code $retcode"
cd - > /dev/null
return $retcode
}

View File

@ -3,23 +3,33 @@ run_remote() {
echo
echo '---------------------------------------------------------------------------'
echo Running $requestedcmd from https://$mgr/confluent-public/os/$profile/scripts/
cd $(mktemp -d)
tmpdir=$(mktemp -d)
echo Executing in $tmpdir
cd $tmpdir
curl -f -sS https://$mgr/confluent-public/os/$profile/scripts/$1 > $1
if [ $? != 0 ]; then echo $requestedcmd failed to download; return 1; fi
chmod +x $1
cmd=$1
shift
./$cmd $*
echo "$requestedcmd exited with code $?"
cd -
retcode=$?
echo "$requestedcmd exited with code $retcode"
cd - > /dev/null
return $retcode
}
run_remote_python() {
echo
echo '---------------------------------------------------------------------------'
echo Running python script "'$*'" from https://$mgr/confluent-public/os/$profile/scripts/
cd $(mktemp -d)
tmpdir=$(mktemp -d)
echo Executing in $tmpdir
cd $tmpdir
curl -f -sS https://$mgr/confluent-public/os/$profile/scripts/$1 > $1
if [ $? != 0 ]; then echo "'$*'" failed to download; return 1; fi
python3 $*
echo "'$*' exited with code $?"
cd -
retcode=$?
echo "'$*' exited with code $retcode"
cd - > /dev/null
return $retcode
}