-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
34 lines (29 loc) · 897 Bytes
/
install.sh
File metadata and controls
34 lines (29 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
TARGET_DIR="$HOME/.vim/plugged"
REPO_NAME="comvimed-rust"
echo "----------------------------------"
echo "Starting installation script"
echo "----------------------------------"
echo "Repository name: $REPO_NAME"
echo "Target directory: $TARGET_DIR"
if [ -d "$TARGET_DIR/$REPO_NAME" ]; then
echo "!! WARNING: Installation directory exists!"
read -p "Overwrite? (y/N) " answer
case $answer in
[yY]*)
echo "Removing old directory..."
rm -rf "$TARGET_DIR/$REPO_NAME"
;;
*)
echo "Installation canceled"
exit 1
;;
esac
fi
echo "Creating directory: $TARGET_DIR/$REPO_NAME"
mkdir -p "$TARGET_DIR/$REPO_NAME"
echo "Copying files..."
cp -r ./* "$TARGET_DIR/$REPO_NAME"/
echo "----------------------------------"
echo "Installation complete!"
echo "----------------------------------"