Files
public-setupfiles/update-from_repo.sh
T

16 lines
452 B
Bash
Raw Normal View History

2024-05-09 15:48:15 -05:00
#!/bin/bash
# Specify the remote repository URL
2024-05-09 15:59:36 -05:00
remote_repo="https://github.com/wickedyoda/public-setupfiles.git"
2024-05-09 15:48:15 -05:00
# Specify the local file path
2024-05-09 15:59:36 -05:00
local_file="./pubic-setupfiles"
2024-05-09 15:48:15 -05:00
# Check if the local file exists
if [ -f "$local_file" ]; then
# Pull the latest updates from the remote repository
git -C "$local_file" pull "$remote_repo"
else
# Clone the remote repository to the local file path
git clone "$remote_repo" "$local_file"
2024-05-09 15:59:36 -05:00
fi