コード例 #1
0
					echo '<h1>Oh. Shit. Something\'s wrong.</h1>error creating directory: ' . $source_dir . '<br />';
				}
			} else {
				// grab our manifest:
				$files = json_decode(file_get_contents('./manifest.diy.org.cashmusic'));
				$filecount = count($files);
				$currentfile = 1;

				foreach ($files as $file) {
					//if (preg_match("/^(tests|installers)/", $file)) { // Don't install tests or installers
					//	continue;
					//}
					if (!file_exists('./source/'.$file)) {
						$path = pathinfo($file);
						if (!is_dir('./source/'.$path['dirname'])) mkdir('./source/'.$path['dirname'],0777,true);
						if (determinedCopy('https://raw.github.com/cashmusic/DIY/latest_stable/'.$file,'./source/'.$file)) {
							echo $source_message;
							if ($currentfile != $filecount) {
								echo '<form action="" method="post" id="nextstepform"><input type="hidden" name="installstage" id="installstageinput" value="2" /></form>';
								echo '<script type="text/javascript">showProgress(' . ceil(100 * ($currentfile / $filecount)) . ');(function(){document.id("nextstepform").fireEvent("submit");}).delay(650);</script>';
							} else {
								// we're done; remove the manifest file
								if (file_exists('./manifest.diy.org.cashmusic')) {
									unlink('./manifest.diy.org.cashmusic');
								}
								echo '<form action="" method="post" id="nextstepform"><input type="hidden" id="installstagefade" value="1" /><input type="hidden" name="installstage" id="installstageinput" value="3" /></form>';
								echo '<script type="text/javascript">hideProgress();(function(){document.id("nextstepform").fireEvent("submit");}).delay(500);</script>';
							}
							break;
						} else {
							echo '<h1>Oh. Shit. Something\'s wrong.</h1>error copying file: ' . (string)$file . '<br />';
コード例 #2
0
     } else {
         echo '<h1>Oh. Shit. Something\'s wrong.</h1>error creating source directory<br />';
     }
 } else {
     // grab our manifest:
     $release_profile = json_decode(file_get_contents('./release_profile.json'), true);
     $files = $release_profile['blobs'];
     $filecount = count($files);
     $currentfile = 1;
     foreach ($files as $file => $hash) {
         if (!file_exists('./source/' . $file)) {
             $path = pathinfo($file);
             if (!is_dir('./source/' . $path['dirname'])) {
                 mkdir('./source/' . $path['dirname'], 0755, true);
             }
             if (determinedCopy('http://cashmusic.s3.amazonaws.com/releases/' . $_SESSION['release_id'] . '/' . $file, './source/' . $file)) {
                 echo $source_message;
                 if ($currentfile != $filecount) {
                     echo '<form action="" method="post" id="nextstepform"><input type="hidden" name="installstage" id="installstageinput" value="2" /></form>';
                     echo '<script type="text/javascript">showProgress(' . ceil(100 * ($currentfile / $filecount)) . ');(function(){document.id("nextstepform").fireEvent("submit");}).delay(60);</script>';
                 } else {
                     // we're done; remove the manifest file
                     if (file_exists('./release_profile.json')) {
                         unlink('./release_profile.json');
                     }
                     echo '<form action="" method="post" id="nextstepform"><input type="hidden" id="installstagefade" value="1" /><input type="hidden" name="installstage" id="installstageinput" value="3" /></form>';
                     echo '<script type="text/javascript">hideProgress();(function(){document.id("nextstepform").fireEvent("submit");}).delay(250);</script>';
                 }
                 break;
             } else {
                 echo '<h1>Oh. Shit. Something\'s wrong.</h1>error copying file: ' . (string) $file . '<br />';
コード例 #3
0
         }
     } else {
         echo '<h1>Oh. Shit. Something\'s wrong.</h1>error creating source directory<br />';
     }
 } else {
     // grab our manifest:
     $files = json_decode(file_get_contents('./manifest.diy.org.cashmusic'));
     $filecount = count($files);
     $currentfile = 1;
     foreach ($files as $file) {
         if (!file_exists('./source/' . $file)) {
             $path = pathinfo($file);
             if (!is_dir('./source/' . $path['dirname'])) {
                 mkdir('./source/' . $path['dirname'], 0777, true);
             }
             if (determinedCopy('https://raw.github.com/cashmusic/DIY/' . $_SESSION['branch'] . '/' . $file, './source/' . $file)) {
                 echo $source_message;
                 if ($currentfile != $filecount) {
                     echo '<form action="" method="post" id="nextstepform"><input type="hidden" name="installstage" id="installstageinput" value="2" /></form>';
                     echo '<script type="text/javascript">showProgress(' . ceil(100 * ($currentfile / $filecount)) . ');(function(){document.id("nextstepform").fireEvent("submit");}).delay(650);</script>';
                 } else {
                     // we're done; remove the manifest file
                     if (file_exists('./manifest.diy.org.cashmusic')) {
                         unlink('./manifest.diy.org.cashmusic');
                     }
                     echo '<form action="" method="post" id="nextstepform"><input type="hidden" id="installstagefade" value="1" /><input type="hidden" name="installstage" id="installstageinput" value="3" /></form>';
                     echo '<script type="text/javascript">hideProgress();(function(){document.id("nextstepform").fireEvent("submit");}).delay(500);</script>';
                 }
                 break;
             } else {
                 echo '<h1>Oh. Shit. Something\'s wrong.</h1>error copying file: ' . (string) $file . '<br />';