Skip to content
This repository

patch-tool-mxe update for index.html #37

Closed
wants to merge 1 commit into from

2 participants

william3 mabrand
william3

changes to the patch tool :

  • a script line is modified to suit the new index.html

  • I made other changes to have something that works for me, but I don't know how to use the patch tool properly. Essentially, I added a "rm -Rf .git" in the "init" step. Don't know if this is usefull for others

What I do :

tar -xvzf path/to/mxe/pkg/my-package1.2.3
path/to/mxe/tools/patch-tool-mxe init my-package
[modifications]
path/to/mxe/tools/patch-tool-mxe export my-package
But then, if a new upcoming my-package1.2.4 arrives, how to do ?

mabrand
Owner
mabrand commented May 09, 2012

#34 already proposed a fix to get the version from index.html. See further comments there.

mabrand mabrand closed this June 13, 2012
mabrand
Owner

closing for now since it more or less duplicates 34.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

May 08, 2012
william3 patch-tool-mxe update for index.html fde05e4
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 9 additions and 7 deletions. Show diff stats Hide diff stats

  1. 16  tools/patch-tool-mxe
16  tools/patch-tool-mxe
@@ -8,6 +8,7 @@ pkg=$2
8 8
 
9 9
 # MXE directory
10 10
 mxedir=~/mxe
  11
+mxesrc=$mxedir/src
11 12
 
12 13
 # directory for unpacked tarballs/git repos
13 14
 gitsdir=~/gits
@@ -16,18 +17,17 @@ gitsdir=~/gits
16 17
 # John Doe <John Doe@acme.org>
17 18
 author=`git var GIT_AUTHOR_IDENT | sed 's/^\(.* [<].*[>]\).*$/\1/'`
18 19
 
19  
-pkg_version=`grep '^$(PKG)_VERSION' $mxedir/src/$pkg.mk  | \
20  
-  sed 's/.*:= \(.*\)/\1/'`
  20
+pkg_version=`grep $pkg-version $mxedir/index.html  | sed s/.*$pkg-version'">\(.*\)<\/td>/\1/'`
21 21
 
22 22
 pkg_short_version=`echo $pkg_version | sed s/'\(.*\)\.[^.]*$'/'\1'/`
23 23
 
24  
-pkg_subdir=`grep '^$(PKG)_SUBDIR' $mxedir/src/$pkg.mk  | \
  24
+pkg_subdir=`grep '^$(PKG)_SUBDIR' $mxesrc/$pkg.mk  | \
25 25
   sed 's/.*:= \(.*\)/\1/' | \
26 26
   sed s/'$($(PKG)_VERSION)'/$pkg_version/ | \
27 27
   sed s/'$(call SHORT_PKG_VERSION,$(PKG))'/$pkg_short_version/ | \
28 28
   sed s/'$(PKG)'/$pkg/;`
29 29
 
30  
-pkg_file=`grep '^$(PKG)_FILE' $mxedir/src/$pkg.mk  | \
  30
+pkg_file=`grep '^$(PKG)_FILE' $mxesrc/$pkg.mk  | \
31 31
   sed 's/.*:= \(.*\)/\1/' | \
32 32
   sed s/'$($(PKG)_VERSION)'/$pkg_version/ | \
33 33
   sed s/'$(call SHORT_PKG_VERSION,$(PKG))'/$pkg_short_version/ | \
@@ -47,7 +47,7 @@ function init_git {
47 47
   echo $pkg_file | grep "\.tar\.xz"  >> /dev/null && xz -dc $mxedir/pkg/$pkg_file | tar xf -
48 48
   echo $pkg_file | grep "\.zip"      >> /dev/null && unzip  $mxedir/pkg/$pkg_file >> /dev/null
49 49
   cd $gitsdir/$pkg_subdir && \
50  
-  (git init; git add -A; git commit -m "init") > /dev/null
  50
+  (rm -Rf .git; git init; git add -A; git commit -m "init") > /dev/null
51 51
   git tag dist
52 52
 }
53 53
 
@@ -59,14 +59,16 @@ function export_patch {
59 59
     echo ''
60 60
     echo 'Contains ad hoc patches for cross building.'
61 61
     echo ''
  62
+	git add -A;
  63
+	git commit -a -m "new version"
62 64
     git format-patch -p --stdout dist..HEAD | \
63 65
     sed 's/^From: .*/From: MXE/g;'
64  
-  ) > $mxedir/src/$pkg-1-fixes.patch
  66
+  ) > $mxesrc/$pkg-1-fixes.patch
65 67
 }
66 68
 
67 69
 function import_patch {
68 70
   cd $gitsdir/$pkg_subdir && \
69  
-  cat $mxedir/src/$pkg-1-fixes.patch | \
  71
+  cat $mxesrc/$pkg-1-fixes.patch | \
70 72
   sed '/^From/,$  !d' | \
71 73
   sed s/'^From: .*'/"From: $author"/'g;' | \
72 74
   git am --keep-cr
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.