-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove insomnia configuration
- Loading branch information
1 parent
eac261f
commit e1e851a
Showing
1 changed file
with
0 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
} |