aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorsucanjan <sucanjan@fit.cvut.cz>2018-02-14 21:57:30 +0100
committersucanjan <sucanjan@fit.cvut.cz>2018-02-14 21:57:30 +0100
commit7b34bab6af30df9cfca7df9e0c644a0ea967ff04 (patch)
tree8eed65392f403669b5d57f36115366266b2c50db /bin
Initial commit
Diffstat (limited to 'bin')
-rw-r--r--bin/knapsack_solver12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/knapsack_solver b/bin/knapsack_solver
new file mode 100644
index 0000000..2e2de9d
--- /dev/null
+++ b/bin/knapsack_solver
@@ -0,0 +1,12 @@
+#!/usr/bin/env ruby
+
+require 'knapsack_solver/cli'
+
+begin
+ KnapsackSolver::CLI.run(ARGV)
+ exit 0
+rescue StandardError => e
+ STDERR.puts "ERROR: #{e.message}"
+ STDERR.puts "Try 'knapsack_solver --help' for more information."
+ exit 1
+end