diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2020-05-10 16:56:56 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2020-05-10 16:56:56 +0300 |
commit | c159f3aaefe13724421655d06df990b2ddf23e59 (patch) | |
tree | 669e06d110ae9e248ecccf2e1245841756acbd3e /gitstatus/pull-upstream.zsh | |
parent | 9fc454fc08463a2f69f3d19e7cc56a9473c65f14 (diff) |
nuke gitstatus (going to replace with subtree)
Diffstat (limited to 'gitstatus/pull-upstream.zsh')
-rwxr-xr-x | gitstatus/pull-upstream.zsh | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/gitstatus/pull-upstream.zsh b/gitstatus/pull-upstream.zsh deleted file mode 100755 index 0ec22438..00000000 --- a/gitstatus/pull-upstream.zsh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/zsh - -emulate -L zsh -setopt err_exit no_unset pipe_fail extended_glob xtrace - -: ${GITSTATUS_DIR:=${${(%):-%x}:A:h}} -: ${GITSTATUS_URL:=https://github.com/romkatv/gitstatus.git} - -readonly GITSTATUS_DIR GITSTATUS_URL -readonly -a IGNORE=(pull-upstream.zsh README.md) - -() { - local repo && repo="$(mktemp -d ${TMPDIR:-/tmp}/gitstatus-pull-upstream.XXXXXXXXXX)" - trap "rm -rf ${(q)repo}" EXIT - git clone --depth 1 $GITSTATUS_URL $repo - - local dst - for dst in $GITSTATUS_DIR/**/*(.,@); do - local f=${dst#$GITSTATUS_DIR/} - (( ! ${IGNORE[(I)$f]} )) || continue - local src=$repo/$f - [[ -f $src ]] && { - mkdir -p ${dst:h} && cp -f $src $dst || return - } || { - rm -f $dst - } - done -} |