Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-nodejs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-nodejs
Commits
839b9382
Commit
839b9382
authored
Jun 12, 2015
by
Hunter Loftis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use mv and ln to store and restore cache faster
parent
ce7f4793
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
cache.sh
lib/cache.sh
+4
-5
No files found.
lib/cache.sh
View file @
839b9382
...
...
@@ -55,8 +55,8 @@ restore_cache_directories() {
else
if
[
-e
"
$cache_dir
/node/
$cachepath
"
]
;
then
echo
"-
$cachepath
"
mkdir
-p
"
$build_dir
/
$cachepath
"
cp
-a
"
$cache_dir
/node/
$cachepath
"
$(
dirname
"
$build_dir
/
$cachepath
"
)
mkdir
-p
$(
dirname
"
$build_dir
/
$cachepath
"
)
mv
"
$cache_dir
/node/
$cachepath
"
"
$build_dir
/
$cachepath
"
else
echo
"-
$cachepath
(not cached - skipping)"
fi
...
...
@@ -72,12 +72,11 @@ save_cache_directories() {
local
build_dir
=
${
1
:-}
local
cache_dir
=
${
2
:-}
mkdir
-p
$cache_dir
/node
for
cachepath
in
${
@
:3
}
;
do
if
[
-e
"
$build_dir
/
$cachepath
"
]
;
then
echo
"-
$cachepath
"
mkdir
-p
"
$cache_dir
/node/
$cachepath
"
cp
-a
"
$build_dir
/
$cachepath
"
$(
dirname
"
$cache_dir
/node/
$cachepath
"
)
mkdir
-p
$(
dirname
"
$cache_dir
/node/
$cachepath
"
)
ln
-s
"
$build_dir
/
$cachepath
"
"
$cache_dir
/node/
$cachepath
"
else
echo
"-
$cachepath
(nothing to cache)"
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