Skip to content

Instantly share code, notes, and snippets.

View olejorgenb's full-sized avatar

Ole Jørgen Brønner olejorgenb

View GitHub Profile
@olejorgenb
olejorgenb / merge-repo-to-subdir.sh
Created July 16, 2017 04:41 — 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)
#!/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 September 13, 2018 07:16 — forked from aherrmann/pnix-shell.sh
Fully persistent Nix shell
#!/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