[go: up one dir, main page]

Menu

[5f68b1]: / setup  Maximize  Restore  History

Download this file

26 lines (21 with data), 505 Bytes

#!/bin/bash

COMPONENT=${COMPONENT:=main}
DISTS=$(grep "Codename:" "./conf/distributions" | sed -e 's/Codename: //')

if [ "$1" == "remove" ]; then
	if [ ! -n "${2+x}" ]; then
		echo "Error: Please provide package name to remove"
		exit 1
	else
		for D in ${DISTS}; do
			reprepro remove ${D} $2
		done
	fi
	exit 0
fi

if [ ! "$2" == "" ]; then
	COMPONENT=$2
fi

for D in ${DISTS}; do
	echo -e "\nSetting up for distribution: ${D}"
	reprepro --ask-passphrase -Vb . -C ${COMPONENT} includedeb ${D} $1
done