#!/bin/bash # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# # This tool generates full update packages for the update system. # Author: Darin Fisher #
if [ $1 = -h ]; then
print_usage
notice ""
notice "The contents of DIRECTORY will be stored in ARCHIVE."
notice ""
notice "Options:"
notice " -h show this help text"
notice " -q be less verbose"
notice ""
exit 1 fi
if [ $1 = -q ]; then
QUIET=1 export QUIET
shift fi
archive="$1"
targetdir="$2" # Prevent the workdir from being inside the targetdir so it isn't included in # the update mar. if [ $(echo"$targetdir" | grep -c '\/$') = 1 ]; then # Remove the /
targetdir=$(echo"$targetdir" | sed -e 's:\/$::') fi
workdir="$targetdir.work"
updatemanifestv3="$workdir/updatev3.manifest"
targetfiles="updatev3.manifest"
mkdir -p "$workdir"
# Generate a list of all files in the target directory.
pushd "$targetdir" if test $? -ne 0 ; then
exit 1 fi
if [ ! -f "precomplete" ]; then if [ ! -f "Contents/Resources/precomplete" ]; then
notice "precomplete file is missing!"
exit 1 fi fi
list_files files
popd
# Add the type of update to the beginning of the update manifests.
> "$updatemanifestv3"
notice ""
notice "Adding type instruction to update manifests"
notice " type complete" echo"type \"complete\"" >> "$updatemanifestv3"
# Append remove instructions for any dead files.
notice ""
notice "Adding file and directory remove instructions from file 'removed-files'"
append_remove_instructions "$targetdir""$updatemanifestv3"
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.