Your Name e85aa5c81b
Some checks failed
Dropshell Test / Build_and_Test (push) Failing after 23s
.
2025-05-10 10:41:31 +12:00

33 lines
571 B
Bash
Executable File

#!/bin/bash
directory_to_run_in=${1:-}
command_to_run_base64=${2:-}
if [ -z "$directory_to_run_in" ]; then
echo "Usage: $0 <directory_to_run_in> <command_to_run>"
exit 1
fi
if [ -z "$command_to_run_base64" ]; then
echo "Usage: $0 <directory_to_run_in> <command_to_run>"
exit 1
fi
command_to_run=$(echo "$command_to_run_base64" | base64 -d)
if [ -z "$command_to_run" ]; then
echo "Usage: $0 <directory_to_run_in> <command_to_run>"
exit 1
fi
if [ -n "$directory_to_run_in" ]; then
cd "$directory_to_run_in"
fi
eval "$command_to_run"