Compare commits

..

2 Commits

Author SHA1 Message Date
henrov 0a9f2731de ABsolute paths 2026-03-04 15:38:26 +01:00
henrov 3fadf99190 Absolute paths 2026-03-04 15:31:15 +01:00
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
# Source and destination directories # Source and destination directories
SOURCE_DIR="../../assets/copy_stuff/" SOURCE_DIR="/home/henrov/Repos/nixos/henrovnix_ok/assets/copy_stuff/"
DEST_DIR="$HOME" DEST_DIR="/home/henrov/"
# Check if source directory exists # Check if source directory exists
if [ ! -d "$SOURCE_DIR" ]; then if [ ! -d "$SOURCE_DIR" ]; then
echo "Error: Source directory $SOURCE_DIR does not exist." echo "Error: Source directory $SOURCE_DIR does not exist."
+4 -4
View File
@@ -2,17 +2,17 @@
set -euo pipefail set -euo pipefail
#creating a timestamp-file to see whether this script ran #creating a timestamp-file to see whether this script ran
TIMESTAMP_FILE="$HOME/nixos_conf/nixos_timestamp.txt" TIMESTAMP_FILE="/home/henrov/nixos_conf/nixos_timestamp.txt"
date +"%Y-%m-%d %H:%M:%S" > "$TIMESTAMP_FILE" date +"%Y-%m-%d %H:%M:%S" > "$TIMESTAMP_FILE"
echo "File $TIMESTAMP_FILE created" echo "File $TIMESTAMP_FILE created"
#cleaning up .backup files (do not worry, they exist safely in ./assets/copy_stuff/.config) #cleaning up .backup files (do not worry, they exist safely in ./assets/copy_stuff/.config)
find ~/.config -name "*.backup" -delete find /home/henrov/.config -name "*.backup" -delete
echo "~/.config/*.backup files deleted" echo "/home/henrov/.config/*.backup files deleted"
#copying stuff from assets/copy_stuff to ~ #copying stuff from assets/copy_stuff to ~
echo "Now in path $(pwd)" echo "Now in path $(pwd)"
COPY_SCRIPT="./copy_stuff.sh" COPY_SCRIPT="/home/henrov/Repos/nixos/henrovnix_ok/assets/scripts/copy_stuff.sh"
if [ ! -f "$COPY_SCRIPT" ]; then if [ ! -f "$COPY_SCRIPT" ]; then
echo "Error: Script $COPY_SCRIPT does not exist." echo "Error: Script $COPY_SCRIPT does not exist."
exit 1 exit 1