Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9344277
cherry-py-repo-from-template
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
659 B
Subscribers
None
cherry-py-repo-from-template
View Options
#!/usr/bin/env bash
TEMPLATE_DIR
=
"swh-py-template"
usage
()
{
echo
"Usage: cherry-py-repo-from-template GIT_REVISION [REPO_NAME]"
echo
echo
"Apply the GIT_REVISION change of the swh-py-template repository to either"
echo
"REPO_NAME, or all Python repositories"
exit
1
}
if
[
-z
"
$1
"
]
;
then
usage
fi
gitrev
=
"
$1
"
shift
1
apply_to_repo
()
{
repo
=
"
$1
"
echo
"* Applying to repo
$1
..."
(
cd
"
$TEMPLATE_DIR
"
&&
git
show
"
$gitrev
"
)
|
(
cd
"
$repo
"
;
git
apply
)
}
if
[
-n
"
$1
"
]
;
then
repo
=
"
$1
"
apply_to_repo
"
$repo
"
else
for
repo
in
`
bin/ls-py-modules
`
;
do
apply_to_repo
"
$repo
"
done
echo
"All done."
fi
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Fri, Jul 4, 2:17 PM (2 d, 6 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3287444
Attached To
rDENV Development environment
Event Timeline
Log In to Comment