Skip to content

Commit

Permalink
Merge pull request #20 from fuchs-fabian/v2.1
Browse files Browse the repository at this point in the history
V2.1
  • Loading branch information
fuchs-fabian authored Nov 23, 2024
2 parents 056bc9a + 09fd3ec commit bee988e
Show file tree
Hide file tree
Showing 3 changed files with 178 additions and 39 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ Usage: (sudo) domposy
Note: '-a, --action' should be used before this, otherwise it has no effect
Default: '/tmp/domposy/backups/'
--keep-backups [keep backups] Number of backups to keep
Default: 'all'
--log-dir [log dir] Directory for log files
Default: '/tmp/domposy/logs/'
Expand Down
9 changes: 7 additions & 2 deletions setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,12 @@ function install {
download_path="$CONST_GLOBAL_DOWNLOAD_PATH"
bin_path="$CONST_GLOBAL_BIN_PATH"
else
echo
echo "You are not root."
echo "The installation will be only available for the current user."
echo "To install it globally, please run this script as root (sudo)."

read -r -p "Do you want to continue? [Y/n] " choice
read -r -p "Do you want to continue? [y/N] " choice
if [[ "$choice" =~ ^[Yy]$ ]]; then
download_path="$CONST_USER_DOWNLOAD_PATH"
bin_path="$CONST_USER_BIN_PATH"
Expand All @@ -129,6 +130,8 @@ function install {
echo "Bin path: '$bin_path'"

for repo_url in "${CONST_REPO_URLS[@]}"; do
echo

local app_name
app_name=$(get_app_name_from_repo_url "$repo_url")

Expand Down Expand Up @@ -205,10 +208,12 @@ function uninstall {
echo "Bin path: '$bin_path'"

for repo_url in "${CONST_REPO_URLS[@]}"; do
echo

app_name=$(get_app_name_from_repo_url "$repo_url")

if [ -d "$download_path/$app_name" ] && [ -L "$bin_path/$app_name" ]; then
read -r -p "Do you want to uninstall '$app_name'? [Y/n] " choice
read -r -p "Do you want to uninstall '$app_name'? [y/N] " choice
if [[ "$choice" =~ ^[Yy]$ ]]; then
echo "Uninstalling '$app_name'..."

Expand Down
Loading

0 comments on commit bee988e

Please sign in to comment.