Added start- end end-scripts
This commit is contained in:
+1
-3
@@ -8,10 +8,8 @@ if [ ! -d "$SOURCE_DIR" ]; then
|
||||
echo "Error: Source directory $SOURCE_DIR does not exist."
|
||||
exit 1
|
||||
fi
|
||||
# Create destination directory if it doesn't exist
|
||||
mkdir -p "$DEST_DIR"
|
||||
# Use rsync to copy files, overwriting symlinks and existing files
|
||||
# --delete removes files in DEST_DIR that are not in SOURCE_DIR
|
||||
# --no-group --no-owner preserves your user ownership
|
||||
rsync -av --no-group --no-owner --delete "$SOURCE_DIR/" "$DEST_DIR/"
|
||||
rsync -av --no-group --no-owner "$SOURCE_DIR/" "$DEST_DIR/"
|
||||
echo "Config files copied from $SOURCE_DIR to $DEST_DIR. Symlinks replaced with editable files."
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
# Example of how to execute a script
|
||||
# Path to the script to execute
|
||||
COPY_SCRIPT="./assets/scripts/copy_stuff.sh"
|
||||
# Check if the script exists
|
||||
if [ ! -f "$COPY_SCRIPT" ]; then
|
||||
echo "Error: Script $COPY_SCRIPT does not exist."
|
||||
exit 1
|
||||
fi
|
||||
# Execute the script
|
||||
"$COPY_SCRIPT"
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
# Example of how to execute a script
|
||||
# Path to the script to execute
|
||||
#COPY_SCRIPT="./assets/scripts/copy_stuff.sh"
|
||||
# Check if the script exists
|
||||
#if [ ! -f "$COPY_SCRIPT" ]; then
|
||||
# echo "Error: Script $COPY_SCRIPT does not exist."
|
||||
#$ exit 1
|
||||
#fi
|
||||
# Execute the script
|
||||
#"$COPY_SCRIPT"
|
||||
Reference in New Issue
Block a user