Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Android/build/build/soong/scripts/     Datei vom 26.5.2026 mit Größe 444 B image not shown  

Quelle  update_out   Sprache: Shell

 

#! /bin/bash
# Run given command application and update the contents of a given file.
# Will not change the file if its contents has not changed.
[[ $# -gt 1 ]] || { echo "Usage: ${0##*/} FILE COMMAND" >&2; exit 1; }
set -u
declare -r outfile="$1"
shift
if [[ ! -f $outfile ]]; then
 $@ >$outfile
 exit
fi

declare -r newout=${outfile}.new
$@ >$newout
rc=$?
if cmp -s $newout $outfile; then
 rm $newout
else
 mv -f $newout $outfile
fi
exit $rc

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland