From abd75ad3cedf6c429f1343e92445e5e51425060d Mon Sep 17 00:00:00 2001 From: Ted Kirkpatrick Date: Sat, 8 Jan 2022 10:16:48 -0800 Subject: [PATCH] Add fixup.sh, a utility to speed development See README.md for description of this utility. --- README-dev.md | 19 +++++++++++++++++-- fixup.sh | 7 +++++++ 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100755 fixup.sh diff --git a/README-dev.md b/README-dev.md index 1dd2346..9fe1146 100644 --- a/README-dev.md +++ b/README-dev.md @@ -1,11 +1,26 @@ # Developer's notes for c756 quickies These files are defined to be used in both host OS and -c756-exer tools container configuratios. +c756-exer tools container configurations. + +The following scripts simplify the development process. + +## `xfer.sh`: Transfer files to `c756-exer` After modifying any of these files, run `xfer.sh`to transfer the updated files into the `profiles` subdirectory of the `c756-exer` repo. Then commit the updated files to `c756-exer` as well. Note that `xfer.sh` does more than simply copy the files: It also -modifies their settings to match the different environment in `c756-exer`. \ No newline at end of file +modifies their settings to match the different environment in `c756-exer`. + +## `fixup.sh`: Automatically edit `.ec2.mak` to your settings + +The utility `fixup.sh` can be used when revising `.ec2.mak`. The committed +revisions have to have empty values for variables such as `SGI_WFH`, yet +when running tests you need your actual values set. + +To get around this, edit `fixup.sh` to include your settings for `SGI_SFH`, +`KEY`, and `LKEY`. Then, after editing `.ec2.mak`, commit the file +with empty values, then run `fixup.sh` to set the values correctly for +your use. Then test the file with these correct values. \ No newline at end of file diff --git a/fixup.sh b/fixup.sh new file mode 100755 index 0000000..ce7a1c5 --- /dev/null +++ b/fixup.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# Update c756-exer/profiles/ec2.mak with a developer's current settings +# Set the variable values to your settings before running +set -o nounset +set -o errexit +set -o xtrace +sed -e 's|SGI_WFH=.*|SGI_WFH=sg-6dfead08|' -e 's|KEY=.*|KEY=aws|' -e 's|LKEY=.*|LKEY=~/.ssh/aws.pem|' -i .bak ../c756-exer/profiles/ec2.mak