Skip to content

Instantly share code, notes, and snippets.

Avatar

Ole Jørgen Brønner olejorgenb

View GitHub Profile
@olejorgenb
olejorgenb / merge-repo-to-subdir.sh
Created Jul 16, 2017 — forked from andsens/merge-repo-to-subdir.sh
Merges a repo into a subdirectory of another repo (useful when making a submodule part of a parent repo)
View merge-repo-to-subdir.sh
#!/bin/bash -e
function merge_repo_to_subdir {
local url=$1
local commit=$2
local module_path=$3
if [[ -z $url || -z $commit || -z $module_path ]]; then
echo "Usage: merge-repo-to-subdir.sh URL BRANCH PATH" >&2
exit 1
@olejorgenb
olejorgenb / pnix-shell.sh
Last active Sep 13, 2018 — forked from aherrmann/pnix-shell.sh
Fully persistent Nix shell
View pnix-shell.sh
#!/usr/bin/env bash
# This is free and unencumbered software released into the public domain.
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the