Skip to content

Instantly share code, notes, and snippets.

@upperstream
upperstream / optimise_repo_mirrors.sh
Last active February 11, 2018 16:17
Vagrant shell provisioner script to optimise package repository list
#!/bin/sh
case `uname` in
Darwin)
sudo -H -u vagrant ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" || sudo -H -u vagrant brew update --force
;;
FreeBSD)
pkg update
;;
Linux)
if uname -r | grep -F tinycore > /dev/null; then
@upperstream
upperstream / Dockerfile.debian-heirloom-sh
Last active September 21, 2017 20:44
Dockerfile for Debian with Heirloom Bourne Shell
FROM debian
RUN apt-get update && \
apt-get -y install build-essential wget && \
cd /tmp && \
wget -O - http://heirloom.cvs.sourceforge.net/viewvc/heirloom/heirloom-sh/?view=tar | tar zxvf - && \
cd heirloom-sh && \
sed -e 's:^SV3BIN=/usr/5bin:SV3BIN=/usr/local/bin:' -e 's:^MANDIR=/usr/share/man/5man:MANDIR=/usr/share/local/man:' -e 's:^UCBINST=/usr/ucb/install:UCBINST=/usr/bin/install:' makefile > makefile.new && \
mv makefile.new makefile && \
make && \
make install && \
@upperstream
upperstream / httpserver.sh
Last active December 9, 2023 14:58
Simple HTTP Server (shell script)
#!/bin/sh
#
# Copyright (C) 2017 Upper Stream.
#
# See the bottom of this file for licensing conditions.
#
#set -x
set -e