#!/bin/sh # This script applies the contents of "common.sh" to the other files. set -e # Go to the directory that contains this script dir=${0%"${0##*/}"} if [ -n "$dir" ]; then cd "$dir" fi update() { { sed -n '1,/^#----BEGIN INCLUDE common\.sh/p' "$1" cat < "$1.part" mv -f "$1.part" "$1" } update completion.bash update completion.zsh update key-bindings.bash update key-bindings.zsh