Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
pourmand1376 committed Aug 13, 2023
1 parent dec2119 commit b3867de
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ repos:
rev: v1.0.6
hooks:
- id: shell-lint
args: ["--severity", "warning"]
37 changes: 21 additions & 16 deletions obsidian.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
#!/bin/bash
echo "Script Version 0.4.1.3"
echo "Script Version 0.4.1.4"
echo "This script is used to facilitate configuration of git for obsidian. "

HOME_PATH="/data/data/com.termux/files/home"
DOWNLOAD_FOLDER="$HOME_PATH/storage/shared/Download"

OBSIDIAN_SCRIPT='
function sync_obsidian()
{
cd "$1" || { echo "Failure while changing directory into $1"; exit 1; }
git add .
git commit -m "Android Commit"
git fetch
git merge --no-edit
git add .
git commit -m "automerge android"
git push
echo "Sync is finished"
sleep 2
}
'

# Define functions for each menu option
function install_required_deps()
Expand Down Expand Up @@ -268,6 +253,26 @@ write_to_file_if_not_exists "source $HOME_PATH/.$folder" "$HOME_PATH/.profile"
echo "alias $alias created in .$folder"
echo "You should exit the program for changes to take effect."
}

# shellcheck disable=SC2016

OBSIDIAN_SCRIPT='
function sync_obsidian()
{
cd "$1" || { echo "Failure while changing directory into $1"; exit 1; }
git add .
git commit -m "Android Commit"
git fetch
git merge --no-edit
git add .
git commit -m "automerge android"
git push
echo "Sync is finished"
sleep 2
}
'


# Main menu loop
while true; do
PS3='Please enter your choice: '
Expand Down

0 comments on commit b3867de

Please sign in to comment.