Permalink
Browse files

A small and a populate script

  • Loading branch information...
Piotr Karbowski
Piotr Karbowski committed May 24, 2012
1 parent 7563613 commit 6a8ce2c572face68b460b93bc0b5e0cbce96cf56
Showing with 26 additions and 0 deletions.
  1. +3 −0 configs/DOTzshrc
  2. +23 −0 populate
View
@@ -36,6 +36,9 @@ run_under_tmux() {
# torrent() { run_under_tmux rtorrent /usr/local/rtorrent-git/bin/rtorrent; }
# irc() { run_under_tmux irssi; }
+ # There is a bug in linux's libevent...
+ # export EVENT_NOEPOLL=1
+
command -v tmux >/dev/null 2>&1 || return 1
if [ -z "$1" ]; then return 1; fi
View
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+readonly scriptpath="$(readlink -f "$0")"
+readonly workdir="${scriptpath%/*}"
+
+update() {
+ if [ -z "$1" ] || [ -z "$2" ]; then return 1; fi
+ if [ -f "$1" ] && [ -r "$1" ] && ! [ -L "$1" ] && ! cmp --silent "$1" "$2"; then
+ echo ">>> Updating '$2' from '$1' ..."
+ cat "$1" > "${workdir}/$2"
+ else
+ return 1
+ fi
+}
+
+update /etc/dnsmasq.conf configs/dnsmasq.conf
+update ~/.zshrc configs/DOTzshrc
+update ~/.Xdefaults configs/DOTXDefaults
+update ~/.config/tint2/tint2rc configs/tint2rc
+update ~/.asoundrc configs/DOTasoundrc
+update ~/.tmux.conf configs/DOTtmux.conf
+
+git status --porcelain

0 comments on commit 6a8ce2c

Please sign in to comment.