summaryrefslogtreecommitdiffstats
path: root/Cancer/crypto/git/git-eternal-move
blob: 50361e7bdc316fbe41d067213b964a13fb9c26c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#! /bin/sh
#
# git-eternal-move FROM TO-DIRECTORY
#
set -euf
if test $# -ne 2; then
  echo 'Error 1: You are made of stupid!' >&2
  exit 23
fi
exec git filter-branch --tree-filter "
  set -euf
  if test -e '$1'; then
    mkdir -p '$2'
    mv '$1' '$2'
  fi"