#!/bin/bash GLOBIGNORE=".:.." 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 IGNORE=intel else #IGNORE=/etc/X11/xorg.conf.d/20-nvidia.conf IGNORE=nvidia fi for dir in $DIRS; do if [ -d "$DIR$dir" ]; then for script in $DIR$dir/*; do filename=$(basename $script) dest="$dir/$filename" if [ -d "$script" ]; then echo "$script is a directory, skipping..." continue; elif echo "$script" | grep -q $IGNORE; then echo "IGNOREING" echo "$script should be ignored, skipping..." continue; elif [ -e "$dest" ]; then echo "File exists"; rm $dest fi ln -s $script $dest done fi done