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