Extend manage script
[ci skip]
This commit is contained in:
parent
0b3c2e7da2
commit
2a0abdd1f5
12
manage
12
manage
@ -8,11 +8,13 @@ Usage: $0 <command> [options]
|
|||||||
|
|
||||||
Commands:
|
Commands:
|
||||||
help Show this help message and exit
|
help Show this help message and exit
|
||||||
new <name> Create a new song with the specified name
|
new [name] Create a new song [with the specified name]
|
||||||
|
edit <name> Edit song with $EDITOR (taken from the EDITOR env var)
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
$0 help
|
$0 help
|
||||||
$0 new [song-name]
|
$0 new [song-name]
|
||||||
|
$0 edit spalovac-chlastu
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
exit 1
|
exit 1
|
||||||
@ -43,6 +45,14 @@ case "$1" in
|
|||||||
fi
|
fi
|
||||||
create_new_song
|
create_new_song
|
||||||
;;
|
;;
|
||||||
|
edit)
|
||||||
|
if [ "$#" -eq 2 ]; then
|
||||||
|
$EDITOR "content/$2/$2.cho"
|
||||||
|
else
|
||||||
|
echo -e "Missing song name\n"
|
||||||
|
usage
|
||||||
|
fi
|
||||||
|
;;
|
||||||
help)
|
help)
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
|
@ -40,9 +40,6 @@ The `manage` shell script lets you do basic song management and saves you some
|
|||||||
manual labour. Simply run the script itself or invoke `help` to get a list of
|
manual labour. Simply run the script itself or invoke `help` to get a list of
|
||||||
all available commands.
|
all available commands.
|
||||||
|
|
||||||
For now the script only supports creating new songs, which it does in an
|
|
||||||
interactive way by asking for important data and filling all needed templates.
|
|
||||||
|
|
||||||
```
|
```
|
||||||
./manage help
|
./manage help
|
||||||
Usage: ./manage <command> [options]
|
Usage: ./manage <command> [options]
|
||||||
|
Loading…
Reference in New Issue
Block a user