mirror of
https://github.com/RGBCube/agenix
synced 2025-07-31 02:37:45 +00:00
add flake and default .nix files; add agenix command
This commit is contained in:
parent
4c2fd23693
commit
79244b4fc3
6 changed files with 205 additions and 20 deletions
49
pkgs/agenix.sh
Normal file
49
pkgs/agenix.sh
Normal file
|
@ -0,0 +1,49 @@
|
|||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p age yq-go moreutils
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-h|--help)
|
||||
echo "$package - attempt to capture frames"
|
||||
echo " "
|
||||
echo "$package [options] application [arguments]"
|
||||
echo " "
|
||||
echo "options:"
|
||||
echo "-h, --help show brief help"
|
||||
echo "-a, --action=ACTION specify an action to use"
|
||||
echo "-o, --output-dir=DIR specify a directory to store output in"
|
||||
exit 0
|
||||
;;
|
||||
-a)
|
||||
shift
|
||||
if test $# -gt 0; then
|
||||
export PROCESS=$1
|
||||
else
|
||||
echo "no process specified"
|
||||
exit 1
|
||||
fi
|
||||
shift
|
||||
;;
|
||||
--action*)
|
||||
export PROCESS=`echo $1 | sed -e 's/^[^=]*=//g'`
|
||||
shift
|
||||
;;
|
||||
-o)
|
||||
shift
|
||||
if test $# -gt 0; then
|
||||
export OUTPUT=$1
|
||||
else
|
||||
echo "no output dir specified"
|
||||
exit 1
|
||||
fi
|
||||
shift
|
||||
;;
|
||||
--output-dir*)
|
||||
export OUTPUT=`echo $1 | sed -e 's/^[^=]*=//g'`
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue