-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·38 lines (28 loc) · 910 Bytes
/
install.sh
File metadata and controls
executable file
·38 lines (28 loc) · 910 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
35
36
37
38
#!/bin/bash
set -e
# Arch Dotfiles Installer
# Installs dotfiles to home directory
DOTFILES_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
HOME_DIR="${HOME}"
echo "Installing dotfiles from $DOTFILES_DIR..."
# Create directories if they don't exist
mkdir -p "$HOME_DIR/.config"
mkdir -p "$HOME_DIR/.local/bin"
# Install configs
for file in "$DOTFILES_DIR/home"/{.config,.*}; do
[ -e "$file" ] || continue
filename=$(basename "$file")
# Skip git-related files
if [[ "$filename" == ".git"* ]]; then
continue
fi
target="$HOME_DIR/$filename"
if [ -e "$target" ]; then
echo " Backing up existing $filename..."
mv "$target" "$target.bak.$(date +%s)"
fi
echo " Installing $filename..."
cp -r "$file" "$target"
done
echo "Installation complete!"
echo "Note: Some configs may need additional dependencies. Check README.md"