https://github.com/getpagespeed/spectool2
Spectool with editing capabilities
https://github.com/getpagespeed/spectool2
Last synced: 5 months ago
JSON representation
Spectool with editing capabilities
- Host: GitHub
- URL: https://github.com/getpagespeed/spectool2
- Owner: GetPageSpeed
- Created: 2019-05-14T13:54:45.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-05-16T15:44:20.000Z (about 4 years ago)
- Last Synced: 2024-12-31T18:30:15.609Z (over 1 year ago)
- Language: Perl
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# spectool2
For my [awesome RHEL 6/7 repository](https://www.getpagespeed.com/redhat), I needed a tool to deal with updating some tags and information within the `.spec` files.
I found *none* that work on the command line.
This is my attempt at hiding the ugly regexes for editing .spec files by extending the standard `spectool` with "write" capabilities.
BEWARE! I have no Perl experience and things may be super ugly if you look inside :) But it works for me :D
## Synopsis
### Edit Version
spectool2 --edit-version 4.3.2.1 some.spec # results in Version: 4.3.2.1
### Get a global value
spectool2 --get-global --name upstream_version some.spec
Note that `--get-global` only prints the first occurrence of a global, if there
are multiple.
### Edit a tag
spectool2 --edit-tag Vendor --value GetPageSpeed some.spec
Note: the tag must already exist for this to work.
### Also
The standard `spectool` function (listing source files and fetching them) is there. The only major change, is that listing a single source file will give you just that, its resource.
So `spectool2 --source 0 some.spec` will give you `some.tar.gz` and not `Source0: some.tar.gz` to assist with scripting.
## Installation in CentOS / RHEL 7
yum install https://extras.getpagespeed.com/release-el7-latest.rpm
yum install spectool2