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

⌈⌋ branch:  scripts + snippets


Check-in [692d0a3f23]

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

Overview
Comment:Superseded by <a href="https://fossil.include-once.org/versionnum/">version read/write</a>
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:692d0a3f23a3db65850e8438fcbd61ef58f67597
User & Date: mario 2014-03-21 01:27:02
Context
2014-03-21
01:28
Shortened. check-in: 63d55e97c1 user: mario tags: trunk
01:27
Superseded by <a href="https://fossil.include-once.org/versionnum/">version read/write</a> check-in: 692d0a3f23 user: mario tags: trunk
01:15
moved to <a href="/php-scripts">separate repo</a> check-in: 81acd3793c user: mario tags: trunk
Changes

Deleted 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

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































Deleted 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;
}


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<