raku

My Raku Scripts Collection
git clone https://fab.ddns.me.uk/stagit/raku
Log | Files | Refs | README

INSTALL.md (2180B)


      1 1. サーバー側:ディレクトリ作成と権限設定
      2 
      3 # ディレクトリを一括作成
      4 ```sh
      5 doas mkdir -p /var/www/stagit/raku.git
      6 doas mkdir -p /var/www/stagit/raku
      7 ```
      8 
      9 # 所有者をあなた(masayoshi)にして、グループをwwwにする
     10 ```sh
     11 doas chown -R masayoshi:www /var/www/stagit/
     12 ```
     13 
     14 2. サーバー側:ベアリポジトリの初期化
     15 ```sh
     16 cd /var/www/stagit/raku.git
     17 git init --bare -b main
     18 ```
     19 
     20 # メタデータの流し込み
     21 ```sh
     22 echo "https://fab.ddns.me.uk/stagit/raku" > url
     23 echo "masayoshi" > owner
     24 echo "My Raku Project" > description
     25 echo "My Raku Scripts Collection" | doas tee /var/www/stagit/raku.git/description
     26 ```
     27 
     28 3. ローカル側(192.168.1.3):pushの設定
     29 ```sh
     30 mkdir -p ~/stagit/raku  
     31 cd ~/stagit/raku
     32 git init -b main
     33 git config user.name "masayoshi"
     34 git config user.email "masayoshi@example.com"
     35 echo "My Raku Scripts Collection" > ~/stagit/raku/.git/description
     36 ```
     37 
     38 # 初回のみリモートを追加
     39 ```sh
     40 git remote add origin masayoshi@192.168.1.19:/var/www/stagit/raku.git
     41 ```
     42 
     43 ```sh
     44 cat << 'EOF' > README.md
     45 # Raku Scripts Repository
     46 
     47 This repository contains my personal collection of Raku scripts, hosted on an OpenBSD server using **stagit**.
     48 
     49 ## Project Goal
     50 The aim of this project is to organise and share various Raku utilities developed for system administration and general tasks.
     51 
     52 ## Environment
     53 - **Server:** OpenBSD
     54 - **Generator:** stagit
     55 - **Licence:** ISC Licence
     56 
     57 ## Author
     58 - **Name:** masayoshi
     59 EOF
     60 ```
     61 
     62 ```sh
     63 git add README.md 
     64 git commit -m "Initialise project"
     65 ```
     66 
     67 # サーバーへ送信
     68 ```sh
     69 git push -u origin main
     70 ```
     71 
     72 # Automating the process
     73 
     74 Please append the following line to <code> /usr/local/share/git-core/templates/hooks/post-receive</code> :
     75 
     76 ```sh
     77 #!/bin/sh
     78 /usr/bin/perl /var/www/usr/local/bin/update-stagit.pl "$(pwd)" 2>&1
     79 ```
     80 
     81 
     82 ```sh
     83 doas chmod +x /usr/local/share/git-core/templates/hooks/post-receive
     84 doas cp update-stagit.pl /var/www/usr/local/bin/                  
     85 doas chmod +x /var/www/usr/local/bin/update-stagit.pl 
     86 ```
     87 
     88 # 画像の表示
     89 
     90 Place some files such as favicon.ico, logo.png and style.css in /var/www/stagit.
     91 Then cp them to new repositories.