Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Trashy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
trashy
Trashy
Commits
9ec9c851
Commit
9ec9c851
authored
Jul 06, 2015
by
Klaatu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
using basename to correct a path error, corrected find syntax.
parent
e15cf986
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
install.sh
install.sh
+3
-2
trashy
trashy
+6
-6
No files found.
install.sh
View file @
9ec9c851
...
...
@@ -7,8 +7,9 @@ if [ "X$OS" == "XDarwin" ]
else
INSTDIR
=
/usr/local/bin
fi
cp
-fv
./trash
$INSTDIR
/trash
chmod
+x
$INSTDIR
/trash
cp
-fv
./trashy
$INSTDIR
chmod
+x
$INSTDIR
/trashy
||
exit
1
ln
-s
$INSTDIR
/trashy
$INSTDIR
/trash
########################################
### uncomment the block below if you ###
...
...
trashy
View file @
9ec9c851
#!/bin/bash
VERSION
=
1.
0
VERSION
=
1.
2
# trash - the command line trashcan
#
# Copyright (C) 2011-13 Klaatu la Terible
...
...
@@ -47,7 +47,7 @@ empty() {
fi
# process verbosity and dry-run options
$ACT
$BASKET
$KILL
-mindepth
1
$ACT
$BASKET
-mindepth
1
$KILL
exit
}
...
...
@@ -110,10 +110,10 @@ fi
# pitch it
if
[
"X
$ARG
"
!=
"X"
]
;
then
for
waste
in
${
RUBBISH
[*]
}
;
do
$ACT
$VERBOSE
"
$(
echo
"
${
waste
}
"
|
sed
's%__+trash+__%\ %g'
)
"
$BASKET
/files/
${
waste
}
;
echo
"[Trash Info]"
>
$BASKET
/info/
${
waste
}
.trashinfo
echo
"Path="
$(
realpath
"
${
waste
}
"
)
>>
$BASKET
/info/
${
waste
}
.trashinfo
echo
"DeletionDate=
$(
date
+%Y-%m-%dT%T
)
"
>>
$BASKET
/info/
${
waste
}
.trashinfo
$ACT
$VERBOSE
"
$(
echo
"
${
waste
}
"
|
sed
's%__+trash+__%\ %g'
)
"
$BASKET
/files/
`
basename
${
waste
}
`
;
echo
"[Trash Info]"
>
$BASKET
/info/
`
basename
${
waste
}
.trashinfo
`
echo
"Path="
$(
realpath
"
${
waste
}
"
)
>>
$BASKET
/info/
`
basename
${
waste
}
.trashinfo
`
echo
"DeletionDate=
$(
date
+%Y-%m-%dT%T
)
"
>>
$BASKET
/info/
`
basename
${
waste
}
.trashinfo
`
done
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment