20 lines
561 B
Bash
Executable File
20 lines
561 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
#creating a timestamp-file to see whether this script ran
|
|
TIMESTAMP_FILE="$HOME/nixos_conf/nixos_timestamp.txt"
|
|
date +"%Y-%m-%d %H:%M:%S" > "$TIMESTAMP_FILE"
|
|
echo "File created"
|
|
|
|
#cleaning up .backup files (do not worry, they exist safely in ./assets/copy_stuff/.config)
|
|
find ~/.config -name "*.backup" -delete
|
|
echo "Files deleted"
|
|
|
|
#copying stuff from assets/copy_stuff to ~
|
|
COPY_SCRIPT="./copy_stuff.sh"
|
|
if [ ! -f "$COPY_SCRIPT" ]; then
|
|
echo "Error: Script $COPY_SCRIPT does not exist."
|
|
exit 1
|
|
fi
|
|
"$COPY_SCRIPT"
|