Last active
August 29, 2015 14:08
-
-
Save iamtew/e4ebc2e4d79850d272d6 to your computer and use it in GitHub Desktop.
Dead simple Debian repository generator for simple package hosting
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 | |
# mk_simple_repo.sh - Simple Debian repository generator | |
# | |
# Prerequisites: | |
# Packages: | |
# dpkg-dev | |
# VirtualHost: | |
# <Directory /var/www/repos/ > | |
# Options Indexes FollowSymLinks Multiviews | |
# Order allow,deny | |
# Allow from all | |
# </Directory> | |
# | |
# Client configuration: | |
# echo "deb http://example.com/repos ./" >> /etc/apt/sources.list | |
repository='/var/www/repos' | |
overrrides='/dev/null' | |
pushd "$repository" | |
/usr/bin/dpkg-scanpackages --multiversion . "$overrrides" \ | |
| gzip -9c > "$repository"/Packages.gz | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment