Commit 2e4429f 1 parent a5e9a03 commit 2e4429f Copy full SHA for 2e4429f
File tree 2 files changed +38
-0
lines changed
2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env node
2
+
3
+ // The `openssl` version is not actually stored in the `pkgver` variable, but in
4
+ // `_ver` (because of the funny trailing letter in the OpenSSL v1.1.* versions)
5
+
6
+ ( async ( ) => {
7
+ const version = process . argv [ 2 ]
8
+
9
+ const fs = require ( 'fs' )
10
+ const lines = fs . readFileSync ( 'PKGBUILD' ) . toString ( 'utf-8' ) . split ( / \r ? \n / )
11
+ lines . forEach ( ( line , i ) => {
12
+ if ( ( match = line . match ( / ^ ( \s * _ b a s e _ v e r = ) \S + / ) ) ) {
13
+ lines [ i ] = `${ match [ 1 ] } ${ version } `
14
+ } else if ( ( match = line . match ( / ^ ( \s * p k g r e l = ) \S + / ) ) ) {
15
+ lines [ i ] = `${ match [ 1 ] } 1`
16
+ }
17
+ } )
18
+ fs . writeFileSync ( 'PKGBUILD' , lines . join ( '\n' ) )
19
+ } ) ( ) . catch ( console . log )
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env node
2
+
3
+ // The `openssl` version is not actually stored in the `pkgver` variable, but in
4
+ // `_ver` (because of the funny trailing letter in the OpenSSL v1.1.* versions)
5
+
6
+ ( async ( ) => {
7
+ const version = process . argv [ 2 ]
8
+
9
+ const fs = require ( 'fs' )
10
+ const lines = fs . readFileSync ( 'PKGBUILD' ) . toString ( 'utf-8' ) . split ( / \r ? \n / )
11
+ lines . forEach ( ( line , i ) => {
12
+ if ( ( match = line . match ( / ^ ( \s * _ p k g v e r = ) \S + / ) ) ) {
13
+ lines [ i ] = `${ match [ 1 ] } ${ version } `
14
+ } else if ( ( match = line . match ( / ^ ( \s * p k g r e l = ) \S + / ) ) ) {
15
+ lines [ i ] = `${ match [ 1 ] } 1`
16
+ }
17
+ } )
18
+ fs . writeFileSync ( 'PKGBUILD' , lines . join ( '\n' ) )
19
+ } ) ( ) . catch ( console . log )
You can’t perform that action at this time.
0 commit comments