commit 6685ada8d0224fe18e6992c604272ff89a869c49 parent e2478bf9bf352ce17884b9958977ab558417851d Author: masayoshi <masayoshi@example.com> Date: Mon, 23 Feb 2026 13:00:14 +0900 Upload Diffstat:
| A | INSTALL.md | | | 91 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1 file changed, 91 insertions(+), 0 deletions(-)
diff --git a/INSTALL.md b/INSTALL.md @@ -0,0 +1,91 @@ +1. サーバー側:ディレクトリ作成と権限設定 + +# ディレクトリを一括作成 +```sh +doas mkdir -p /var/www/stagit/raku.git +doas mkdir -p /var/www/stagit/raku +``` + +# 所有者をあなた(masayoshi)にして、グループをwwwにする +```sh +doas chown -R masayoshi:www /var/www/stagit/ +``` + +2. サーバー側:ベアリポジトリの初期化 +```sh +cd /var/www/stagit/raku.git +git init --bare -b main +``` + +# メタデータの流し込み +```sh +echo "https://fab.ddns.me.uk/stagit/raku" > url +echo "masayoshi" > owner +echo "My Raku Project" > description +echo "My Raku Scripts Collection" | doas tee /var/www/stagit/raku.git/description +``` + +3. ローカル側(192.168.1.3):pushの設定 +```sh +mkdir -p ~/stagit/raku +cd ~/stagit/raku +git init -b main +git config user.name "masayoshi" +git config user.email "masayoshi@example.com" +echo "My Raku Scripts Collection" > ~/stagit/raku/.git/description +``` + +# 初回のみリモートを追加 +```sh +git remote add origin masayoshi@192.168.1.19:/var/www/stagit/raku.git +``` + +```sh +cat << 'EOF' > README.md +# Raku Scripts Repository + +This repository contains my personal collection of Raku scripts, hosted on an OpenBSD server using **stagit**. + +## Project Goal +The aim of this project is to organise and share various Raku utilities developed for system administration and general tasks. + +## Environment +- **Server:** OpenBSD +- **Generator:** stagit +- **Licence:** ISC Licence + +## Author +- **Name:** masayoshi +EOF +``` + +```sh +git add README.md +git commit -m "Initialise project" +``` + +# サーバーへ送信 +```sh +git push -u origin main +``` + +# Automating the process + +Please append the following line to <code> /usr/local/share/git-core/templates/hooks/post-receive</code> : + +```sh +#!/bin/sh +/usr/bin/perl /var/www/usr/local/bin/update-stagit.pl "$(pwd)" 2>&1 +``` + + +```sh +doas chmod +x /usr/local/share/git-core/templates/hooks/post-receive +doas cp update-stagit.pl /var/www/usr/local/bin/ +doas chmod +x /var/www/usr/local/bin/update-stagit.pl +``` + +# 画像の表示 + +Place some files such as favicon.ico, logo.png and style.css in /var/www/stagit. +Then cp them to new repositories.