Accept a path argument on the command line
This commit is contained in:
parent
a105c69723
commit
4c095996cc
1 changed files with 7 additions and 2 deletions
|
@ -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 <path_to_psp_iso>");
|
||||
return 2;
|
||||
}
|
||||
|
||||
string serial = iso_to_serial(argv[1]);
|
||||
writeln(db.find_by_serial(serial));
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue