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
|
||||
read -p "Voer de mapnaam in (optioneel, enter voor standaard): " dir_name
|
||||
# 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"
|
||||
if [ -z "$DIR_NAME" ]; then
|
||||
git clone "$REPO_URL"
|
||||
else
|
||||
git clone "$repo_url" "$dir_name"
|
||||
fi
|
||||
git clone "$REPO_URL" "$DIR_NAME"
|
||||
fi
|
||||
|
||||
echo "Klaar."
|
||||
Reference in New Issue
Block a user