Update install/bensprogamma/install.sh
This commit is contained in:
@@ -1,11 +1,25 @@
|
|||||||
read -p "Voer de Git repository URL in: " repo_url
|
#!/bin/bash
|
||||||
|
|
||||||
# Vraag om een mapnaam, laat leeg voor standaard
|
# Default Git repository (kan leeg zijn of een voorbeeld)
|
||||||
read -p "Voer de mapnaam in (optioneel, enter voor standaard): " dir_name
|
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
|
# Clone de repo
|
||||||
if [ -z "$dir_name" ]; then
|
if [ -z "$DIR_NAME" ]; then
|
||||||
git clone "$repo_url"
|
git clone "$REPO_URL"
|
||||||
else
|
else
|
||||||
git clone "$repo_url" "$dir_name"
|
git clone "$REPO_URL" "$DIR_NAME"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Klaar."
|
||||||
Reference in New Issue
Block a user