Commits
Lukas A authored and md_5 committed 0880f1d6f6c
136 136 | dev = options.has( devFlag ); |
137 137 | |
138 138 | logOutput(); |
139 139 | |
140 140 | if ( Float.parseFloat( System.getProperty( "java.class.version" ) ) < 51.0 ) |
141 141 | { |
142 142 | System.err.println( "*** WARNING *** You are not using Java 7 or above. Although this will work, it is highly discouraged due to the security issues present." ); |
143 143 | System.err.println( "*** WARNING *** Use java -version to check your version and update as soon as possible." ); |
144 144 | } |
145 145 | |
146 - | try |
147 - | { |
148 - | runProcess( CWD, "bash", "-c", "exit" ); |
149 - | } catch ( Exception ex ) |
146 + | String shell = System.getenv().get( "SHELL" ); |
147 + | if ( shell == null || shell.trim().isEmpty() ) |
150 148 | { |
151 149 | System.out.println( "You must run this jar through bash (msysgit)" ); |
152 150 | System.exit( 1 ); |
153 151 | } |
154 152 | |
155 153 | try |
156 154 | { |
157 155 | runProcess( CWD, "git", "config", "--global", "user.name" ); |
158 156 | } catch ( Exception ex ) |
159 157 | { |
419 417 | { |
420 418 | runProcess( bukkit, "sh", mvn, "source:jar" ); |
421 419 | } |
422 420 | |
423 421 | System.out.println( "Compiling CraftBukkit" ); |
424 422 | runProcess( craftBukkit, "sh", mvn, "clean", "install" ); |
425 423 | } |
426 424 | |
427 425 | try |
428 426 | { |
429 - | runProcess( spigot, "bash", "applyPatches.sh" ); |
427 + | runProcess( spigot, shell, "applyPatches.sh" ); |
430 428 | System.out.println( "*** Spigot patches applied!" ); |
431 429 | |
432 430 | if ( !skipCompile ) |
433 431 | { |
434 432 | System.out.println( "Compiling Spigot & Spigot-API" ); |
435 433 | runProcess( spigot, "sh", mvn, "clean", "install" ); |
436 434 | } |
437 435 | } catch ( Exception ex ) |
438 436 | { |
439 437 | System.err.println( "Error compiling Spigot. Please check the wiki for FAQs." ); |