+ std::string src = argv[optind];
+ std::string dst = argv[optind + 1];
+
+ // statefile_suffix
+
+ if (!ends_with (src, statefile_suffix)) {
+ fprintf (stderr, "source is not a .ardour session file.\n");
+ exit (1);
+ }
+ if (!ends_with (dst, statefile_suffix)) {
+ fprintf (stderr, "target is not a .ardour session file.\n");
+ exit (1);
+ }
+ if (!Glib::file_test (src, Glib::FILE_TEST_IS_REGULAR)) {
+ fprintf (stderr, "source is not a regular file.\n");
+ exit (1);
+ }
+ if (!Glib::file_test (dst, Glib::FILE_TEST_IS_REGULAR)) {
+ fprintf (stderr, "target is not a regular file.\n");
+ exit (1);
+ }
+
+ std::string src_path = Glib::path_get_dirname (src);
+ std::string src_name = PBD::basename_nosuffix (src);
+ std::string dst_path = Glib::path_get_dirname (dst);
+ std::string dst_name = PBD::basename_nosuffix (dst);
+
+ // TODO check if src != dst ..