aboutsummaryrefslogtreecommitdiff
path: root/backup-config
diff options
context:
space:
mode:
Diffstat (limited to 'backup-config')
-rwxr-xr-xbackup-config29
1 files changed, 0 insertions, 29 deletions
diff --git a/backup-config b/backup-config
deleted file mode 100755
index c292bf4..0000000
--- a/backup-config
+++ /dev/null
@@ -1,29 +0,0 @@
1#!/bin/sh
2
3# Backup local configuration files
4
5destdir=$HOME/Dropbox/configbackups
6srcdir=$HOME/.local/src
7
8# Uncomment to clean old backups
9#rm -rf $destdir/config $destdir/scripts $destdir/src
10mkdir -p $destdir/config $destdir/src
11
12# First copy everything from .config and .bashrc and similar
13cp -r $XDG_CONFIG_HOME/* $destdir/config/
14cp $HOME/.bash* $destdir/
15
16# Then copy files from src (only source, config, makefile and READMEs)
17srcsubdirs=$(ls $srcdir)
18for i in $srcsubdirs; do
19 si="$srcdir/$i"
20 if [ -d "$si" ]; then
21 mkdir -p $destdir/src/$i
22 for f in "$si/*.c" "$si/*.h" "$si/config.*" "$si/Makefile" "$si/README*"; do
23 for ff in $f; do
24 [ -e $ff ] && cp $f $destdir/src/$i/
25 done
26 done
27 fi
28done
29

Generated with cgit - Back to sebastiano.tronto.net