From 716ed2414600bb018e67761df5c5d34f5e1acb7b Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Sun, 30 Apr 2017 22:32:46 -0400 Subject: Rm old content --- init.sh | 39 ---------------------------- resolvers.sh | 85 ------------------------------------------------------------ 2 files changed, 124 deletions(-) delete mode 100644 init.sh delete mode 100644 resolvers.sh diff --git a/init.sh b/init.sh deleted file mode 100644 index b772015..0000000 --- a/init.sh +++ /dev/null @@ -1,39 +0,0 @@ -## -# init_wktree [] -# -# Assert that the repository at exists, then setup the -# .systr directory at the CWD. -## -function init_wktree -{ - if [ $# -gt 3 ]; then - remote=$3 - shift - else - remote="" - fi - - path=$3 - - # local repository # - if [[ "$remote" == "" ]]; then - if [ ! -f "$path/HEAD" ]; then - echo "Error: $path is not a repository" - exit 1 - fi - - mkdir -p .systr/ - - echo "" >.systr/remote - echo "$path" >.systr/path - echo "NULL" >.systr/BASE - echo "NULL" >.systr/TRAC - - echo "Setup worktree at $(pwd)" - - # remote repository # - else - exit 1 - - fi -} diff --git a/resolvers.sh b/resolvers.sh deleted file mode 100644 index dc0af37..0000000 --- a/resolvers.sh +++ /dev/null @@ -1,85 +0,0 @@ -## -# get_commit -# -# Resolve a revision to a commit ID, exit via fatal error if -# resolution cannot take place. -## -function get_commit -{ - # local repository # - if [[ "$remote" == "" ]]; then - if [[ "$1" == "HEAD" ]]; then - cat "$path/HEAD" - - elif [[ "$1" == "BASE" ]]; then - cat ".systr/BASE" - - elif [[ "$1" == "TRAC" ]]; then - read trac <.systr/TRAC - get_commit "$trac" - - elif [[ "$1" == "NULL" ]]; then - echo "NULL" - - elif [ -f "$path/refs/$1" ]; then - cat "$path/refs/$1" - - elif [[ ${1:0:5} == "refs/" ]]; then - if [ -f "$path/$1" ]; then - cat "$path/$1" - fi - - elif [ -f "$path/$1/.commit.systr" ]; then - echo "$1" - - else - echo "Error: $1 not a revision" >&2 - exit 1 - fi - - # remote repository # - else - exit 1 - - fi -} - -## -# get_symref -# -# Resolve a revision to a symbolic reference, exit via fatal -# error if resolution cannot take place. -## -function get_symref -{ - # local repository # - if [[ "$remote" == "" ]]; then - if [[ "$1" == "HEAD" ]]; then - echo "HEAD" - - elif [[ "$1" == "BASE" ]]; then - echo "BASE" - - elif [[ "$1" == "TRAC" ]]; then - cat ".systr/TRAC" - - elif [[ "$1" == "NULL" ]]; then - echo "NULL" - - elif [ -f "$path/refs/$1" ]; then - echo "refs/$1" - - elif [ -f "$path/$1/.commit.systr" ]; then - echo "$1" - - else - echo "Error: $1 not a revision" >&2 - exit 1 - fi - - # remote repository # - else - exit 1 - - fi -} -- cgit v1.2.3