home-server/roles/init/templates/etc_init.j2

16 lines
611 B
Django/Jinja
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#!/usr/bin/env bash
# The home-server project produces a multi-purpose setup using Ansible.
# Copyright © 20182023 Y. Gablin, under the GPL-3.0-or-later license.
# Full licensing information in the LICENSE file, or gnu.org/licences/gpl-3.0.txt if the file is missing.
. "$(dirname "$0")/.etc_checkroot.inc"
cd /etc
etckeeper init
echo /.updated >>.gitignore
git config user.email {{git_contact_email}}; git config user.name root
git add -A
git ls-files | grep -qxF .updated && git rm --cached .updated
git commit -m 'upstream init'
git branch run master
"$(dirname "$0")/etc_stop_upstream" 'upstream init'