Files
ben.de-roo.org/install/bensprogamma/install.sh

25 lines
531 B
Bash

#!/bin/bash
# Default Git repository (kan leeg zijn of een voorbeeld)
DEFAULT_REPO="https://github.com/torvalds/linux.git"
# Gebruik argument 1 als URL, anders default
REPO_URL="${1:-$DEFAULT_REPO}"
# Gebruik argument 2 als mapnaam, anders standaard naam van repo
DIR_NAME="${2:-}"
# Check of URL leeg is
if [ -z "$REPO_URL" ]; then
echo "Error: Geen Git repository opgegeven."
exit 1
fi
# Clone de repo
if [ -z "$DIR_NAME" ]; then
git clone "$REPO_URL"
else
git clone "$REPO_URL" "$DIR_NAME"
fi
echo "Klaar."