Posted By

deepsoul on 09/30/09


sed clone cygwin

Versions (?)

Zero version numbers to clone Cygwin installation

 / Published in: Regular Expression


A Cygwin installation can be cloned by copying /etc/setup/installed.db and zeroing all version numbers, then running the installation utility. The following sed script will set the version of most packages to zero. Some non-standard version numbers will not be affected and have to be zeroed by hand.

  1. s/-[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9a-zA-Z]\+-[0-9]\+\.tar/-
  2. s/-[0-9]\+\.[0-9]\+\.[0-9a-zA-Z]\+-[0-9]\+\.tar/-0.0.0-0.tar/
  3. s/-[0-9]\+\.[_+0-9a-zA-Z]\+-[0-9]\+\.tar/-0.0-0.tar/
  4. s/-[0-9a-zA-Z]\+-[0-9]\+\.tar/-0-0.tar/
  5. s/-[0-9]\+\.tar/-0.tar/

Report this snippet  

You need to login to post a comment.