-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated scripts and install/uninstall processes, revised LICENSE and …
…README
- Loading branch information
1 parent
6945461
commit 4bd29a4
Showing
6 changed files
with
51 additions
and
24 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
The MIT License (MIT) | ||
|
||
© 2023 Nicolò Diamante <[email protected]> | ||
© 2024 Nicolò Diamante <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
|
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
File renamed without changes.
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 |
---|---|---|
@@ -1,11 +1,18 @@ | ||
#!/bin/zsh | ||
|
||
# | ||
# Norflow — Remove the Shortcuts folder if it's empty. | ||
# Norflow — Remove the Shortcuts folder in iCloud Drive. | ||
# | ||
|
||
shortcuts=~/Library/Mobile\ Documents/iCloud~is~workflow~my~workflows/Documents | ||
if [[ -z "$(ls -A -I ".WorkflowHiddenFile" $shortcut | head -n 5)" ]]; then | ||
# The folder is empty, then remove it. | ||
rm -rf $shortcuts | ||
SHORTCUTS="${HOME}/Library/Mobile Documents/iCloud~is~workflow~my~workflows/Documents" | ||
|
||
# Check if the SHORTCUTS directory exists | ||
if [[ -d "$SHORTCUTS" ]]; then | ||
# Count the number of files excluding .WorkflowHiddenFile | ||
file_count=$(ls -A "${SHORTCUTS}" | grep -v "^\.WorkflowHiddenFile$" | wc -l) | ||
|
||
if [[ $file_count -eq 0 ]]; then | ||
# The folder contains only .WorkflowHiddenFile or is empty, then remove it. | ||
rm -rf "${SHORTCUTS}" | ||
fi | ||
fi |
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
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