Collection of mostly command line tools / PHP scripts. Somewhat out of date.

⌈⌋ branch:  scripts + snippets


Check-in [94410824fb]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:work on php plugin standard files and extract version:\d+ field, while epm_set_version can update epm packaging .list files Both tools have been superseded by <a href=https://fossil.include-once.org/versionnum/>versionnum/</a>
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:94410824fb879d342867924647cd77d2715ad0a0
User & Date: mario 2012-01-09 04:15:27
Original Comment: work on php plugin standard files and extract version:\d+ field, while epm_set_version can update epm packaging .list files
Context
2012-01-09
04:18
dialog based mass renaming check-in: 9db78a345e user: mario tags: trunk
04:15
work on php plugin standard files and extract version:\d+ field, while epm_set_version can update epm packaging .list files Both tools have been superseded by <a href=https://fossil.include-once.org/versionnum/>versionnum/</a> check-in: 94410824fb user: mario tags: trunk
04:14
file replace cmdline tool check-in: c66385ed29 user: mario tags: trunk
Changes

Added epm_set_version.

































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
#
# Updates a %version line in a epm .list file
#

if [ -f "$1" ] ;
then
   perl -n -i -e '
      if (/^[%]version\b/m) {
      print "%version '$2'\n";
   }
   else { print; }' $1
else
   print epm_set_version file.epm 0.1.3
fi

Added get_version.



































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl -n
#
# Extract a version: \d+.. from a file
#
# Looks for following syntax:
#  +-------------------
#  |   * version:
#  |   version:
#  |   %version  
#  |   version=

if (/^\s*[%*]\s*version:\s*(\d[.\d-\w+]+)/m) {
   print $1;
   exit;
}