Permalink
Browse files

Get git-revision from gitrepo if not specified on cmdline

  • Loading branch information...
1 parent 4f57156 commit 207efad71cf5f5ef6b483d0a681b064fe570b504 @kaihendry kaihendry committed Oct 2, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 etc/webc/install-to-disk.sh
View
8 etc/webc/install-to-disk.sh
@@ -95,7 +95,13 @@ install_extlinux() {
_logs "generating extlinux configuration"
git_repo=/live/image/live/filesystem.git
- git_revision=$(cmdline_get git-revision)
+
+ if cmdline_has git-revision
+ then
+ git_revision=$(cmdline_get git-revision)
+ else
+ git_revision=$(git --git-dir "${git_repo}" rev-parse HEAD)
+ fi
# Extract kernel and initrd and generate extlinux config
generate_installed_config "${dir}" "${git_repo}" "${git_revision}"

0 comments on commit 207efad

Please sign in to comment.