12 lines
361 B
Bash
Executable file
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
|