Skip to content

Commit

Permalink
chore: remove insomnia configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
1995parham committed Oct 4, 2023
1 parent eac261f commit e1e851a
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions scripts/insomnia.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,38 +27,3 @@ main_brew() {
main() {
return 0
}

main_parham() {
mkdir -p "$HOME/.config/Insomnia/" || true

if [ -d "$HOME/.config/Insomnia/version-control" ]; then
cd "$HOME/.config/Insomnia/version-control" || return

url=$(git remote get-url origin 2>/dev/null)
if [[ "$url" =~ .*github.com[:/]1995parham-me/insomnia ]]; then
msg 'valid repository, so fetching it'
git pull origin main

return 0
else
msg "invalid repository $url"

if yes_or_no "insomnia" "do you want to remove current insomnia configuration?"; then
msg 'removing current configuration to replace it with new configuration'
rm -Rf "$HOME/.config/Insomnia/version-control"
else
return 1
fi
fi
fi

if [ -e "$HOME/.config/Insomnia/version-control" ] || [ -L "$HOME/.config/Insomnia/version-control" ]; then
if yes_or_no "insomnia" "do you want to remove current insomnia configuration?"; then
msg 'removing current configuration to replace it with new configuration'
rm -Rf "$HOME/.config/Insomnia/version-control"
else
return 1
fi
fi
git clone [email protected]:1995parham-me/insomnia "$HOME/.config/Insomnia/version-control"
}

0 comments on commit e1e851a

Please sign in to comment.