|
@@ -0,0 +1,63 @@
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+commonFiles=();
|
|
|
+for sourceFile in .*; do
|
|
|
+
|
|
|
+
|
|
|
+ if [[ "$sourceFile" == "install_unattended.sh" || "$sourceFile" == "install.sh" ]] || [[ "$sourceFile" == "README.md" ]] || [[ "$sourceFile" == "." ]] || [[ "$sourceFile" == ".." ]] || [[ "$sourceFile" == ".git" ]]; then
|
|
|
+ continue;
|
|
|
+ fi;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ targetFile="$HOME/$sourceFile";
|
|
|
+
|
|
|
+
|
|
|
+ if [ -e "$targetFile" ]; then
|
|
|
+
|
|
|
+
|
|
|
+ [ "$sourceFile" -ef "$targetFile" ] && continue;
|
|
|
+
|
|
|
+
|
|
|
+ diff -rq "$sourceFile" "$targetFile" > /dev/null 2>&1 && continue;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ commonFiles+=("$sourceFile");
|
|
|
+
|
|
|
+ fi;
|
|
|
+done;
|
|
|
+
|
|
|
+
|
|
|
+conflictCount=${#commonFiles[@]};
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+backupSuffix=".jsVimconfig-$(date +'%Y%m%d-%H%M%S')";
|
|
|
+
|
|
|
+
|
|
|
+for sourceFile in "${commonFiles[@]}"; do
|
|
|
+ targetFile="$HOME/$sourceFile";
|
|
|
+ mv -v "$targetFile" "$targetFile$backupSuffix";
|
|
|
+done;
|
|
|
+
|
|
|
+
|
|
|
+for sourceFile in .*; do
|
|
|
+
|
|
|
+
|
|
|
+ if [[ "$sourceFile" == "install_unattended.sh" || "$sourceFile" == "install.sh" ]] || [[ "$sourceFile" == "README.md" ]] || [[ "$sourceFile" == "." ]] || [[ "$sourceFile" == ".." ]] || [[ "$sourceFile" == ".git" ]]; then
|
|
|
+ continue;
|
|
|
+ fi;
|
|
|
+
|
|
|
+ targetFile="$HOME/$sourceFile";
|
|
|
+
|
|
|
+
|
|
|
+ rm -rf "$targetFile" &&
|
|
|
+ ln -vs "$PWD/$sourceFile" "$targetFile";
|
|
|
+done;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+touch ~/.bash_environment;
|
|
|
+echo -e "export __prompt_environment='DEVELOPMENT'" | tee ~/.bash_environment > /dev/null;
|