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
A
attic
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
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
hydrargyrum
attic
Commits
bf4350da
Commit
bf4350da
authored
Jun 02, 2019
by
hydrargyrum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set-cachedir: basic tool to create CACHEDIR.TAG files
parent
347dc421
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
set-cachedir/set-cachedir
set-cachedir/set-cachedir
+33
-0
No files found.
set-cachedir/set-cachedir
0 → 100755
View file @
bf4350da
#!/bin/sh
if
[
$#
-eq
0
]
then
cat
>
&2
<<
EOF
usage:
$0
DIR [DIR...]
Create a "CACHEDIR.TAG" file in the given DIRs.
CACHEDIR.TAG is a file recognized by many archiving tools (including
GNU tar, borg-backup, etc.) indicating the parent directory should NOT
be archived or backed up. See http://www.brynosaurus.com/cachedir/
EOF
exit
64
# EX_USAGE
fi
error
=
0
for
i
do
if
cat
>
"
$i
/CACHEDIR.TAG"
<<
EOF
Signature: 8a477f597d28d172789f06886806bc55
# This file is a cache directory tag.
# For information about cache directory tags, see:
# http://www.brynosaurus.com/cachedir/
EOF
then
echo
"Created '
$i
/CACHEDIR.TAG'"
else
error
=
1
fi
done
exit
$error
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