22 lines
765 B
Bash
Executable File
22 lines
765 B
Bash
Executable File
#!/usr/local/bin/bash
|
|
|
|
# Copyright (c) 2018-2021, diyIT.org
|
|
# All rights reserved.
|
|
#
|
|
# BSD 2-Clause License ("Simplified BSD License" or "FreeBSD License")
|
|
# https://diyit.org/license/
|
|
#
|
|
#
|
|
|
|
diff -ru / configs | grep -v "Only in /" | grep "Only in" | sed 's/Only in // ; s/: /\//' | xargs -n1 echo WILL DELETE
|
|
read -p "(y/N)? " RESP
|
|
if [ ! -z $RESP ] && [ $RESP == "y" ]; then
|
|
diff -ru / configs | grep -v "Only in /" | grep "Only in" | sed 's/Only in // ; s/: /\//' | xargs -n1 rm
|
|
fi
|
|
|
|
diff -ru / configs | grep -v "Only in /" | grep "diff -ru" | sed 's/diff -ru//' | xargs -n2 echo WILL COPY
|
|
read -p "(y/N)? " RESP
|
|
if [ ! -z $RESP ] && [ $RESP == "y" ]; then
|
|
diff -ru / configs | grep -v "Only in /" | grep "diff -ru" | sed 's/diff -ru//' | xargs -n2 cp
|
|
fi
|