Exemple #1
0
            print "Error: cound not create directory: [{$fbcmdBaseDir}]\n";
            FatalError();
        }
        if (!$isWindows) {
            if (chmod($fbcmdBaseDir, octdec($fbcmdPrefs['install_data_mkdir_mode']))) {
                Trace("chmod [{$fbcmdBaseDir}]");
            } else {
                Trace("Error: chmod [{$fbcmdBaseDir}] (non-fatal)");
            }
        }
    }
    $isSavePrefs = true;
}
////////////////////////////////////////////////////////////////////////////////
if ($isSavePrefs && $isSudo == false) {
    $fileContents = SavePrefsContents();
    if (file_put_contents($prefsFile, $fileContents)) {
        Trace("creating file [{$prefsFile}]");
    } else {
        print "Error: cound not create file: [{$prefsFile}] (non-fatal)\n";
    }
}
////////////////////////////////////////////////////////////////////////////////
if ($isHelp || $isFirstInstall) {
    print "Preference file:                 [{$prefsFile}]\n\n";
    print "Software development branch:     [{$fbcmdPrefs['update_branch']}]\n";
    print "Software library destination:    [{$fbcmdPrefs['install_lib_dir']}]\n";
    print "Copy script to bin dir?:         ";
    if ($fbcmdPrefs['install_copy_to_bin']) {
        print "[Yes]\n";
        print "Bin dir location:                [{$fbcmdPrefs['install_bin_dir']}]\n";
Exemple #2
0
function SavePrefs($fileName)
{
    $fileContents = SavePrefsContents();
    if (@file_put_contents($fileName, $fileContents) == false) {
        FbcmdFatalError("Could not write {$fileName}");
    }
}