Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
ffmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Samuel Mira
ffmpeg
Commits
f318ee3e
Commit
f318ee3e
authored
14 years ago
by
Mans Rullgard
Browse files
Options
Downloads
Patches
Plain Diff
Fix quoting in version.sh
parent
daed21a1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
version.sh
+10
-10
10 additions, 10 deletions
version.sh
with
10 additions
and
10 deletions
version.sh
+
10
−
10
View file @
f318ee3e
...
...
@@ -2,32 +2,32 @@
# check for SVN revision number
revision
=
$(
cd
"
$1
"
&&
cat
snapshot_version 2> /dev/null
)
test
$revision
||
revision
=
$(
cd
"
$1
"
&&
LC_ALL
=
C svn info 2> /dev/null |
grep
"Last Changed Rev"
|
cut
-d
' '
-f4
)
test
$revision
||
revision
=
$(
cd
"
$1
"
&&
grep
committed-rev .svn/entries 2>/dev/null |
head
-n
1 |
cut
-d
'"'
-f2
)
test
$revision
||
revision
=
$(
cd
"
$1
"
&&
sed
-n
-e
'/^dir$/{n
test
"
$revision
"
||
revision
=
$(
cd
"
$1
"
&&
LC_ALL
=
C svn info 2> /dev/null |
grep
"Last Changed Rev"
|
cut
-d
' '
-f4
)
test
"
$revision
"
||
revision
=
$(
cd
"
$1
"
&&
grep
committed-rev .svn/entries 2>/dev/null |
head
-n
1 |
cut
-d
'"'
-f2
)
test
"
$revision
"
||
revision
=
$(
cd
"
$1
"
&&
sed
-n
-e
'/^dir$/{n
p
q
}'
.svn/entries 2>/dev/null
)
test
$revision
&&
revision
=
SVN-r
$revision
test
"
$revision
"
&&
revision
=
SVN-r
$revision
# check for git svn revision number
if
!
test
$revision
;
then
if
!
test
"
$revision
"
;
then
revision
=
$(
cd
"
$1
"
&&
git svn find-rev HEAD 2> /dev/null
)
test
$revision
&&
revision
=
git-svn-r
$revision
test
"
$revision
"
&&
revision
=
git-svn-r
$revision
fi
# check for git short hash
if
!
test
$revision
;
then
if
!
test
"
$revision
"
;
then
revision
=
$(
cd
"
$1
"
&&
git describe
--always
2> /dev/null
)
test
$revision
&&
revision
=
git-
$revision
test
"
$revision
"
&&
revision
=
git-
$revision
fi
# no revision number found
test
$revision
||
revision
=
UNKNOWN
test
"
$revision
"
||
revision
=
UNKNOWN
# releases extract the version number from the VERSION file
version
=
$(
cd
"
$1
"
&&
cat
VERSION 2> /dev/null
)
test
$version
||
version
=
$revision
test
"
$version
"
||
version
=
$revision
test
-n
"
$3
"
&&
version
=
$version
-
$3
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment