Git Product home page Git Product logo

tex-skeleton's Introduction

Setup a new Git repository

REPO=myname
mkdir "$REPO"
cd "$REPO"

git init

# Setup Git LFS
git lfs install --local

# Setup Git submodules
for submodule in bibliography tex_skeleton; do
    # Using HTTPS instead of SSH for anonymous cloning of public git submodules.
    #
    # Cloning with SSH instead of HTTPs always requires a valid username
    # and supplying a public SSH keys at your Git server, e.g. git.inf.h-brs.de!
    #
    # Both GitLab.com and GitHub.com do not allow anonymous access through SSH.
    # "Public projects can be cloned without any authentication over HTTPS." [1]
    # "SSH URLs provide access to a Git repository via SSH, a secure protocol.
    #  To use these URLs, you must generate an SSH keypair on your computer
    #  and add the public key to your GitHub account." [2]
    #
    # Ref.:
    # [1] https://docs.gitlab.com/ce/public_access/public_access.html
    # [2] https://help.github.com/en/github/using-git/which-remote-url-should-i-use#cloning-with-ssh-urls
    git submodule add "https://git.inf.h-brs.de/jmeng2m/${submodule}.git"
    git config -f .gitmodules "submodule.${submodule}.update" rebase
    (cd "$submodule" && git checkout master) # Enables 'git pull' in submodule dirs
done

for fgmt in \
    bibliography/references.bib \
    tex_skeleton/.gitattributes \
    tex_skeleton/.gitignore \
    tex_skeleton/Makefile \
; do
    ln -s "$fgmt" "$(basename "$fgmt")"
done

# GitLab CI is configured e.g. to fetch submodules recursively in .gitlab-ci.yml,
# which means .gitlab-ci.yml must be available as a copy (not a link) during clone.
# Also note that including local files through Git submodules paths is not supported.
# Ref.: https://gitlab.com/gitlab-org/gitlab/issues/25249
cp -raiv tex_skeleton/.gitlab-ci.yml.example .gitlab-ci.yml

# for report only
for fgmt in \
    tex_skeleton/report/fgmt_*.tex \
    tex_skeleton/report/language-*.dict \
; do
    ln -s "$fgmt" "$(basename "$fgmt")"
done

# for report only
for fgmt in \
    tex_skeleton/report/*.example \
; do
    cp -raiv "${fgmt}" "$(basename --suffix '.example' "$fgmt")"
done

make

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.