lithium-util/scripts/ereport.sh
2026-05-19 09:45:27 +02:00

12 lines
361 B
Bash
Executable file

#!/bin/bash
set -euo pipefail
DATE=$(date -I)
REPORT_PATH=$HOME/ereport-$(date -I).txt
if [[ -f "$REPORT_PATH" ]]; then
echo "Today's report already exists at $REPORT_PATH!"
else
echo "Syncing repositories..."
# sudo emerge --sync >> "$REPORT_PATH"
echo "Writing update report..."
sudo emerge --update --newuse --deep @world --pretend >> "$REPORT_PATH"
fi