]> git.sur5r.net Git - i3/i3/commitdiff
complete-run.pl: Check for missing executables
authorSascha Kruse <knopwob@googlemail.com>
Tue, 18 Sep 2012 13:36:40 +0000 (15:36 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Thu, 20 Sep 2012 09:37:49 +0000 (11:37 +0200)
testcases/complete-run.pl

index 5ea9d0783777d8f02f265eb7a83375f30a4426b3..d73bb3327d242344f641930d8e34534d5ec725f5 100755 (executable)
@@ -66,6 +66,22 @@ my $result = GetOptions(
 
 pod2usage(-verbose => 2, -exitcode => 0) if $help;
 
+# Check for missing executables
+my @binaries = qw(
+                   ../i3
+                   ../i3bar/i3bar
+                   ../i3-config-wizard/i3-config-wizard
+                   ../i3-dump-log/i3-dump-log
+                   ../i3-input/i3-input
+                   ../i3-msg/i3-msg
+                   ../i3-nagbar/i3-nagbar
+               );
+
+foreach my $binary (@binaries) {
+    die "$binary executable not found" unless -e $binary;
+    die "$binary is not an executable" unless -x $binary;
+}
+
 @displays = split(/,/, join(',', @displays));
 @displays = map { s/ //g; $_ } @displays;