This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
script_version="1.08" | |
SUBST="@repo@" | |
SAVE_IFS="$IFS" | |
if [[ -z $1 || $1 = "--help" ]]; then | |
echo >&2 "Git-specialized version of tool: $script_version" | |
echo >&2 "Usage: T_template1=substitution1 ... T_templateN=substitutionN ./envtemplater.sh repo1@template ... repoN@template -- command [arguments]" | |
echo >&2 "Example: T_github=ALTURL_${SUBST}=https://github.com/vi/${SUBST}.git ./envtemplater.sh dive@github fdlinecombine@github -- ./submodule_update_alturl.sh --force" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
script_version="1.04" | |
unset CDPATH | |
if [[ $1 = "--help" ]]; then | |
echo >&2 "Script version: $script_version" | |
echo >&2 "Expected environment example: ALTURL_repo1name=https://github.com/user1/repo1name.git ALTURL_repo2name=https://github.com/user1/repo2name.git ..." | |
echo >&2 "Expected environment example: mangle_submodule_name() - it should mangle its argument: 'repo/1/name' -> 'repo_1_name'" | |
echo >&2 "Expected environment example: submodule_recurse_script=update-checkout.sh submodule_recurse_arguments='arg1 arg2 arg3'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git init | |
git commit --allow-empty -m "initial empty commit" | |
# Recursively set executable flags for all shell files in git: | |
find . -name '*.sh' -exec git update-index --chmod=+x "{}" \; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Function for setting up precompiled headers. Usage: | |
# | |
# add_library/executable(target | |
# pchheader.c pchheader.cpp pchheader.h) | |
# | |
# add_precompiled_header(target pchheader.h | |
# [FORCEINCLUDE] | |
# [SOURCE_C pchheader.c] | |
# [SOURCE_CXX pchheader.cpp]) | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
if "%~1" == "" goto sub_help | |
REM =================================================== | |
setlocal | |
echo Removing all MSVC generated files from %1 recursively... | |
%~d1 | |
cd "%~1" || goto sub_cd_error | |
echo Current directory: %CD% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
script_version="1.33" | |
set -e | |
set -u | |
set -o pipefail | |
# set -x | |
# ================================================== | |
# This script calculates and prints a software version |