diff --git a/src/main.d b/src/main.d index 1f78b92..3f04879 100644 --- a/src/main.d +++ b/src/main.d @@ -4,10 +4,15 @@ import std.typecons; import gamesdb; import isotoserial; -int main() { +int main(string[] argv) { Unique!GamesDB db = new GamesDB; - string serial = iso_to_serial("/home/michele/deleme/b-mikuex.iso"); + if (argv.length != 2) { + stderr.writeln("Usage: psp2name "); + return 2; + } + + string serial = iso_to_serial(argv[1]); writeln(db.find_by_serial(serial)); return 0; }