Extend manage script
[ci skip]
This commit is contained in:
		
							
								
								
									
										14
									
								
								manage
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								manage
									
									
									
									
									
								
							@@ -7,12 +7,14 @@ usage() {
 | 
			
		||||
Usage: $0 <command> [options]
 | 
			
		||||
 | 
			
		||||
Commands:
 | 
			
		||||
  help        Show this help message and exit
 | 
			
		||||
  new <name>  Create a new song with the specified name
 | 
			
		||||
  help         Show this help message and exit
 | 
			
		||||
  new [name]   Create a new song [with the specified name]
 | 
			
		||||
  edit <name>  Edit song with $EDITOR (taken from the EDITOR env var)
 | 
			
		||||
 | 
			
		||||
Examples:
 | 
			
		||||
  $0 help
 | 
			
		||||
  $0 new [song-name]
 | 
			
		||||
  $0 edit <song-name>
 | 
			
		||||
 | 
			
		||||
EOF
 | 
			
		||||
  exit 1
 | 
			
		||||
@@ -43,6 +45,14 @@ case "$1" in
 | 
			
		||||
		fi
 | 
			
		||||
		create_new_song
 | 
			
		||||
		;;
 | 
			
		||||
	edit)
 | 
			
		||||
		if [ "$#" -eq 2 ]; then
 | 
			
		||||
			$EDITOR "content/$2/$2.cho"
 | 
			
		||||
		else
 | 
			
		||||
			echo -e "Missing song name\n"
 | 
			
		||||
			usage
 | 
			
		||||
		fi
 | 
			
		||||
		;;
 | 
			
		||||
	help)
 | 
			
		||||
		usage
 | 
			
		||||
		;;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user