From 114657bf10911559e84cca571be4fb87e3d0437f Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 4 Oct 2012 20:55:12 +0900 Subject: [PATCH] add arch conf saver --- conf/arch/README.md | 3 +++ conf/arch/updatefiles.sh | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 conf/arch/README.md create mode 100755 conf/arch/updatefiles.sh diff --git a/conf/arch/README.md b/conf/arch/README.md new file mode 100644 index 0000000..c142488 --- /dev/null +++ b/conf/arch/README.md @@ -0,0 +1,3 @@ +# Arch Linux + +some copies of conf files and utils diff --git a/conf/arch/updatefiles.sh b/conf/arch/updatefiles.sh new file mode 100755 index 0000000..3f2be3a --- /dev/null +++ b/conf/arch/updatefiles.sh @@ -0,0 +1,33 @@ +#!/bin/sh +# copy some important files into current directory. + +files=" +/etc/rc.conf +/var/log/pacman.log +/etc/pacman.d/gnupg/gpg.conf +/etc/vconsole.conf +" + +convpass(){ + echo $1 | sed -e 's / ! g' +} + +for i in $files +do + cp -fvu $i ./$(basename $i) +done + +mapdir=/usr/share/kbd/keymaps/i386/qwerty + +test ${mapdir}/myjp106.map.gz -nt ./myjp106.map && +zcat ${mapdir}/myjp106.map.gz >./myjp106.map && +{ + test -f ./jp106.map || + zcat ${mapdir}/jp106.map.gz >./jp106.map + + diff -u ./jp106.map ./myjp106.map >mymap.diff + echo "Make myjp106 patch." +} + +pacman -Qqe | grep -vx "$(pacman -Qqm)" > ./pkg.lst && +echo "Make pkg.lst."