-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #35: Scripts for destructive filesystem operations.
Added scripts for performing destructive filesystem operations. Updated README. Added .gitignore which was, for some reason, itself ignored. Updated Zsh completion, as 'untag' file matching was broken by the move to relative paths in the database.
- Loading branch information
Showing
10 changed files
with
70 additions
and
9 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/bin | ||
/tmsu-* |
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
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,5 +1,9 @@ | ||
bin Supporting binaries. | ||
db-upgrade Database upgrade scripts. | ||
ebnf Extended Backus-Naur Form file for the TMSU query language. | ||
man Man page. | ||
zsh Command completion for the shell Zsh. | ||
bin Supporting executables | ||
mount.tmsu Support for 'mount' command | ||
tmsu-unsafe-rm Delete a file on the filesystem and remove it from TMSU | ||
tmsu-unsafe-mv Move a file and update the path in TMSU | ||
tmsu-unsafe-mf Merges two files by deleting the first and applying its tags to the second | ||
db-upgrade Database upgrade scripts | ||
ebnf Extended Backus-Naur Form file for the TMSU query language | ||
man Man page | ||
zsh Command completion for the shell Zsh |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
|
||
usage="\ | ||
Merges two or more files | ||
Each FILE's tags are applied to DESTFILE before being deleted from the filesystem. | ||
Usage: $0 FILE... DESTFILE" | ||
|
||
if test $# -lt 2; then | ||
echo "${usage}" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
eval last=\${$#} | ||
while test $# -gt 1; do | ||
tmsu tag --from $1 $last && tmsu-fs-rm $1 | ||
shift | ||
done |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
|
||
usage="\ | ||
Moves a file in the filesystem and updates the path in TMSU | ||
Usage: $0 SRCFILE DESTFILE" | ||
|
||
if test $# -ne 2; then | ||
echo "${usage}" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
mv $1 $2 && tmsu repair --manual $1 $2 |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh | ||
|
||
usage="\ | ||
Delete a file in the filesystem and TMSU | ||
Usage: $0 FILE..." | ||
|
||
if test $# -lt 1; then | ||
echo "${usage}" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
while test $# -gt 0; do | ||
tmsu untag --all $1 && rm $1 | ||
shift | ||
done |
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