85 lines
2.3 KiB
Bash
Executable File
85 lines
2.3 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
# Create the needed directories before putting packages into them
|
|
|
|
set -e
|
|
|
|
# There's no difference between NONFREE and EXTRANONFREE for this script
|
|
if [ "${EXTRANONFREE:-0}" != "0" ]
|
|
then
|
|
NONFREE=1
|
|
fi
|
|
|
|
cd $1
|
|
|
|
if [ ! -e debian ] ; then
|
|
ln -sf . debian
|
|
fi
|
|
|
|
if [ ! -d dists/$CODENAME ] ; then
|
|
mkdir -p dists/$CODENAME
|
|
for name in stable unstable oldstable frozen testing; do
|
|
ln -sf $CODENAME dists/$name
|
|
done
|
|
fi
|
|
|
|
# Commodity link for tools which want local in dists/local/local ...
|
|
if [ -n "$LOCAL" ]
|
|
then
|
|
ln -sf $CODENAME dists/local
|
|
fi
|
|
|
|
|
|
if [ ! -d .disk ] ; then
|
|
mkdir .disk
|
|
fi
|
|
|
|
mkdir -p dists/$CODENAME/main/binary-$ARCH
|
|
mkdir -p dists/$CODENAME/main/source
|
|
if [ "${CONTRIB:-0}" != 0 ]; then
|
|
mkdir -p dists/$CODENAME/contrib/binary-$ARCH
|
|
mkdir -p dists/$CODENAME/contrib/source
|
|
fi
|
|
if [ "${NONFREE:-0}" != "0" ]; then
|
|
mkdir -p dists/$CODENAME/non-free/binary-$ARCH
|
|
mkdir -p dists/$CODENAME/non-free/source
|
|
fi
|
|
|
|
if [ -n "$LOCAL" -a -e "${LOCALDEBS:-$MIRROR}/dists/$DI_CODENAME/local/debian-installer" ]; then
|
|
mkdir -p dists/$CODENAME/local/debian-installer/binary-$ARCH
|
|
fi
|
|
if [ -e "$MIRROR/dists/$DI_CODENAME/main/debian-installer" ]; then
|
|
mkdir -p dists/$CODENAME/main/debian-installer/binary-$ARCH
|
|
fi
|
|
|
|
if [ -n "$SECURITY" ]; then
|
|
mkdir -p dists/$CODENAME/updates/main/binary-$ARCH
|
|
mkdir -p dists/$CODENAME/updates/main/source
|
|
if [ "${CONTRIB:-0}" != "0" ]; then
|
|
mkdir -p dists/$CODENAME/updates/contrib/binary-$ARCH
|
|
mkdir -p dists/$CODENAME/updates/contrib/source
|
|
fi
|
|
if [ "${NONFREE:-0}" != "0" ]; then
|
|
mkdir -p dists/$CODENAME/updates/non-free/binary-$ARCH
|
|
mkdir -p dists/$CODENAME/updates/non-free/source
|
|
fi
|
|
fi
|
|
|
|
if [ -n "$NONUS" ]; then
|
|
mkdir -p dists/$CODENAME/non-US/main/binary-$ARCH
|
|
mkdir -p dists/$CODENAME/non-US/main/source
|
|
if [ "${CONTRIB:-0}" != "0" ]; then
|
|
mkdir -p dists/$CODENAME/non-US/contrib/binary-$ARCH
|
|
mkdir -p dists/$CODENAME/non-US/contrib/source
|
|
fi
|
|
if [ "${NONFREE:-0}" != "0" ]; then
|
|
mkdir -p dists/$CODENAME/non-US/non-free/binary-$ARCH
|
|
mkdir -p dists/$CODENAME/non-US/non-free/source
|
|
fi
|
|
fi
|
|
|
|
if [ -n "$LOCAL" ]; then
|
|
mkdir -p dists/$CODENAME/local/binary-$ARCH
|
|
mkdir -p dists/$CODENAME/local/source
|
|
fi
|