shell-scripts/banana-runner/banana-runner.sh

17 lines
345 B
Bash

#!/usr/bin/xonsh
from configparser import ConfigParser
config = ConfigParser()
CONFIG_PATH = "$(pwd)/.banana"
if not isfile(CONFIG_PATH):
echo "banana-runner: no config found!")
exit 1
config.read(CONFIG_PATH)
sections = config.sections()
sections.remove('$')
if len($($!)) == 1 or $($1) == '$':
echo 'banana-runner: no arguments given'