Support older git versions without -C
This commit is contained in:
parent
28d9eb6062
commit
898664d7b3
2 changed files with 24 additions and 21 deletions
22
build.sh
22
build.sh
|
@ -22,21 +22,21 @@ cp $here/logo.png $output/logo.png
|
||||||
ln -sf $output/logo.png $output/favicon.png
|
ln -sf $output/logo.png $output/favicon.png
|
||||||
|
|
||||||
for repo in ${@:-$repos}; do
|
for repo in ${@:-$repos}; do
|
||||||
dir="$output/$(basename $repo .git)"
|
dir="$output/$(basename $repo .git)"
|
||||||
repo=$(realpath $repo)
|
repo=$(realpath $repo)
|
||||||
|
|
||||||
mkdir -p $dir
|
mkdir -p $dir
|
||||||
pushd $dir
|
pushd $dir
|
||||||
|
|
||||||
echo Building html for $repo to $dir
|
echo Building html for $repo to $dir
|
||||||
stagit -c ".cache" $repo
|
stagit -c ".cache" $repo
|
||||||
|
|
||||||
ln -sf log.html index.html
|
ln -sf log.html index.html
|
||||||
ln -sf $output/style.css style.css
|
ln -sf $output/style.css style.css
|
||||||
ln -sf $output/logo.png logo.png
|
ln -sf $output/logo.png logo.png
|
||||||
ln -sf $output/logo.png favicon.png
|
ln -sf $output/logo.png favicon.png
|
||||||
|
|
||||||
popd
|
popd
|
||||||
done
|
done
|
||||||
|
|
||||||
chgrp www-data $output -R
|
chgrp www-data $output -R
|
||||||
|
|
23
new-repo.sh
23
new-repo.sh
|
@ -5,17 +5,20 @@ set -e
|
||||||
cd $(dirname $0)
|
cd $(dirname $0)
|
||||||
|
|
||||||
for name in $@; do
|
for name in $@; do
|
||||||
dir="../$name.git"
|
dir="../$name.git"
|
||||||
url="ssh://osh@192.168.2.6:/~/git/$name.git"
|
url="ssh://osh@192.168.2.6:/~/git/$name.git"
|
||||||
|
|
||||||
mkdir $dir
|
mkdir $dir
|
||||||
git -C $dir init --bare
|
pushd $dir
|
||||||
|
git init --bare
|
||||||
|
popd
|
||||||
|
|
||||||
echo "Oshgnacknak" > $dir/owner
|
|
||||||
echo $url > $dir/url
|
|
||||||
${EDITOR:-vi} $dir/description
|
|
||||||
ln -sr post-receive.sh $dir/hooks/post-receive
|
|
||||||
|
|
||||||
./build.sh $dir
|
echo "Oshgnacknak" > $dir/owner
|
||||||
echo "Clone: $url"
|
echo $url > $dir/url
|
||||||
|
${EDITOR:-vi} $dir/description
|
||||||
|
ln -sr post-receive.sh $dir/hooks/post-receive
|
||||||
|
|
||||||
|
./build.sh $dir
|
||||||
|
echo "Clone: $url"
|
||||||
done
|
done
|
||||||
|
|
Reference in a new issue