diff --git a/install.sh b/install.sh index 336548f..62f651c 100755 --- a/install.sh +++ b/install.sh @@ -5,13 +5,9 @@ DIR=$(dirname $(readlink -f $0)); DIRS="/boot/syslinux /etc /etc/lightdm /etc/X11/xorg.conf.d /etc/skel /usr/share/wallpapers" -IGNORE= - -if lspci -k | grep -A 2 -E "(VGA|3D)" | grep -q INTEL; then - #IGNORE=/etc/X11/xorg.conf.d/20-intel.conf +if lspci -k | grep -A 2 -E "(VGA|3D)" | grep -q NVIDIA; then IGNORE=intel else - #IGNORE=/etc/X11/xorg.conf.d/20-nvidia.conf IGNORE=nvidia fi @@ -26,15 +22,16 @@ for dir in $DIRS; do echo "$script is a directory, skipping..." continue; elif echo "$script" | grep -q $IGNORE; then - echo "IGNOREING" echo "$script should be ignored, skipping..." + if [ -e "$dest" ] || [ -h "$dest" ]; then + rm -v $dest + fi continue; - elif [ -e "$dest" ]; then - echo "File exists"; - rm $dest + elif [ -e "$dest" ] || [ -h "$dest" ]; then + rm -v $dest fi - ln -s $script $dest + ln -sv $script $dest done fi done