Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
cba73414
Commit
cba73414
authored
Mar 14, 2017
by
Ned Batchelder
Committed by
GitHub
Mar 14, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14677 from edx/nedbat/safer-make-clean
Safer "make clean"
parents
291945b6
f7f16b0a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
Makefile
+9
-4
No files found.
Makefile
View file @
cba73414
# Do things in edx-platform
# Do things in edx-platform
# Careful with mktemp syntax: it has to work on Mac and Ubuntu, which have differences.
PRIVATE_FILES
:=
$(
shell
mktemp
-u
/tmp/private_files.XXXXXX
)
clean
:
clean
:
# Remove all the git-ignored stuff, but save and restore things marked
# Remove all the git-ignored stuff, but save and restore things marked
# by start-noclean/end-noclean.
# by start-noclean/end-noclean. Include Makefile in the tarball so that
# there's always at least one file even if there are no private files.
sed
-n
-e
'/start-noclean/,/end-noclean/p'
< .gitignore
>
/tmp/private-files
sed
-n
-e
'/start-noclean/,/end-noclean/p'
< .gitignore
>
/tmp/private-files
tar
cf /tmp/private.tar
`
git ls-files
--exclude-from
=
/tmp/private-files
--ignored
--others
`
-
tar
cf
$(PRIVATE_FILES)
Makefile
`
git ls-files
--exclude-from
=
/tmp/private-files
--ignored
--others
`
git clean
-fdX
-
git clean
-fdX
tar
xf /tmp/private.tar
tar
xf
$(PRIVATE_FILES)
rm
$(PRIVATE_FILES)
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