Register
It is currently Fri Oct 31, 2014 7:13 pm

MakeSwitch


All times are UTC - 6 hours


Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Thu Dec 15, 2011 10:02 am   
User avatar

Joined: Sat Jul 02, 2011 10:43 am
Posts: 23
Location: Devon,UK
A script to create the various case statements to set variables from the command line and optionally insert them into a file, switches can be created from the commands to the makeswitch script or via a config file, see the man page and example files for full details simple help is:
Code:
makeswitch -?
Usage: makeswitch [OPTION]... [FORMAT]...
-b|--binary : Binary states 'ON/OFF'
-s|--string : String initial state
-i|--init : Initialize variable
-n|--no-init : Don't initialize variable
-c|--config : Use config file f
-a|--app-name : Set the application name
-v|--version : Set the application version
-x|--xtra-help : Add 'args' to 'help' option

FORMAT = n:nnn:vartype:info ...
Where n:nnn = short:long-opt
vartype = [b|s|n] [binary, string or null]
info string for help

Config file example:
APPNAME appname
VERSION 0.1.0
OUTPUTFILE EncodeVideo/encodevideo.startup
Initialize following variables
INIT
Don't initialize following variables
NOINIT
BINSTATES Yes/No
STRING "Initial string value"
SWITCH  f:file:s:"Encode file FILE"
SWITCH k:keep:b:"Save sorted original comics"
Paste into front of file FILE (upto ###CUT###)
PASTE FILE
Version 0.2.1

I have not included the script here as It is still under development and there is also a man page and example files, so please download the archive from here:
http://keithhedger.hostingsiteforfree.com/zips/makeswitch.tgz


Top
 Profile WWW  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP