freebsd-ports/science/InsightToolkit/files/fake-git
Yuri Victorovich 84e966ab78 science/InsightToolkit: Update 5.2.1 -> 5.3rc04
Also include most remote modules.
2022-11-18 18:05:11 -08:00

59 lines
804 B
Bash
Executable file

#!/bin/sh
##
## fake git to assist in downloads of remote modules
##
#echo "fake-git called with args: $@" >> /tmp/fake-git.log
case "$1" in
--version)
echo "git version 2.40.0"
exit 0
;;
clone)
# we don't run git clone
#/usr/local/bin/git clone $2 $3 >> /tmp/fake-git.log 2>&1
# args
url=$2
dir=$3
# extract module name
module=$(echo $url | sed -e "s|.*/||; s|\.git\$||")
# copy the tree
cp -r ../$module-* $dir
exit 0
;;
checkout)
# assume git checkout {hash}
# memorize the hash
echo $2 > .hash
exit 0
;;
config)
# ignore
exit 0
;;
remote)
# ignore
exit 0
;;
rev-parse)
# assume: git rev-parse --verify {HASH}
echo "@rev-parse pwd=$(pwd)" >> /tmp/fake-git.log
cat .hash
exit 0
;;
submodule)
# ignore: hope that there are no submodules
exit 0
;;
esac
exit 1