replace pipes with tee

This commit is contained in:
Cere 2024-07-08 03:59:28 -04:00
parent 3c07d807bc
commit 2b1b4144bd

View file

@ -63,17 +63,17 @@ postlaunch () {
fi
rsync -az "$STCS_SAVEPATH/" "$STCS_SYNCED_SAVADATA_PATH/$(basename $STCS_SAVEPATH)/"
fi
date +%s > "$STCS_SYNCED_TIMESTAMP_PATH"
date +%s | tee "$STCS_SYNCED_TIMESTAMP_PATH"
echo "[CereSaves] postlaunch complete"
}
checkpretimestamps () {
if [ ! -f "$STCS_CACHED_TIMESTAMP_PATH" ]; then
# Cached timestamp does not exist.
echo "1" > $STCS_CACHED_TIMESTAMP_PATH
echo "1" | tee "$STCS_CACHED_TIMESTAMP_PATH"
elif [ ! -f "$STCS_SYNCED_TIMESTAMP_PATH" ]; then
# Synced timestamp does not exist
echo "0" > $STCS_SYNCED_TIMESTAMP_PATH
echo "0" | tee "$STCS_SYNCED_TIMESTAMP_PATH"
fi
if [ $(cat "$STCS_SYNCED_TIMESTAMP_PATH") -gt $(cat "$STCS_CACHED_TIMESTAMP_PATH") ]; then
# Update Needed!