summaryrefslogtreecommitdiffstats
path: root/scripts/manicure.rb
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/manicure.rb')
-rwxr-xr-xscripts/manicure.rb31
1 files changed, 18 insertions, 13 deletions
diff --git a/scripts/manicure.rb b/scripts/manicure.rb
index a6fbaf571..d4afb3ed2 100755
--- a/scripts/manicure.rb
+++ b/scripts/manicure.rb
@@ -1922,17 +1922,22 @@ class Display
end
-# First grab the specified CLI options
-options = readOptions
-
-# Only run if one of the useful CLI flags have been passed
-if options.cliraw == true || options.cliparse == true || options.api == true || options.apilist == true
- # This line is the ignition -- generates hashes of
- # presets and then displays them to the screen
- # with the options the user selects on the CLI.
- Display.new( Presets.new.hashMasterList, options )
-else
- # Direct the user to the help
- puts "\n\tUsage: manicure.rb [options]"
- puts "\tSee help with -h or --help"
+# CLI invocation only
+if __FILE__ == $0
+
+ # First grab the specified CLI options
+ options = readOptions
+
+ # Only run if one of the useful CLI flags have been passed
+ if options.cliraw == true || options.cliparse == true || options.api == true || options.apilist == true
+ # This line is the ignition -- generates hashes of
+ # presets and then displays them to the screen
+ # with the options the user selects on the CLI.
+ Display.new( Presets.new.hashMasterList, options )
+ else
+ # Direct the user to the help
+ puts "\n\tUsage: manicure.rb [options]"
+ puts "\tSee help with -h or --help"
+ end
+
end