diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:28:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:28:28 +0000 |
commit | 5a5e2352c9a01f9076994915188c26c6b9036202 (patch) | |
tree | 1e1474b8b914d161946c01ba26a56db68b1fd5d3 /etc/newsyntax | |
parent | Initial commit. (diff) | |
download | screen-5a5e2352c9a01f9076994915188c26c6b9036202.tar.xz screen-5a5e2352c9a01f9076994915188c26c6b9036202.zip |
Adding upstream version 4.9.0.upstream/4.9.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'etc/newsyntax')
-rwxr-xr-x | etc/newsyntax | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/etc/newsyntax b/etc/newsyntax new file mode 100755 index 0000000..6b5bb03 --- /dev/null +++ b/etc/newsyntax @@ -0,0 +1,64 @@ +#!/bin/sh +# +# newsyntax -- update a screenrc file from 3.2 to 3.3 syntax +# +# please check all comments after running this script and watch out +# for funny passages. +# +if [ $# != 1 ]; then + echo "usage $0 screenrcfile" + exit 1; +fi + +#Ultrix 4.2 /bin/sh does not handle "read a < $1" +#Dean Gaudet <dgaudet@watdragon.uwaterloo.ca> +exec < $1 +read a + +if [ ."$a" = '.#3.3' ]; then + echo "$1 already updated" + exit 0 +fi + +cp $1 $1.old +echo "#3.3" > $1 +echo "# Do not remove the above line. This screen rc file was updated" >> $1 +echo "# by the newsyntax script." >> $1 +sed < $1.old >> $1 \ +-e 's/\([ #]\)flow/\1defflow/g' \ +-e 's/^flow/defflow/g' \ +-e 's/\([ #]\)set[ ]*defflow/\1flow/g' \ +-e 's/^set[ ]*defflow/flow/g' \ +-e 's/\([ #]\)mode/\1defmode/g' \ +-e 's/^mode/defmode/g' \ +-e 's/\([ #]\)set[ ]*defmode/\1defmode/g' \ +-e 's/^set[ ]*defmode/defmode/g' \ +-e 's/\([ #]\)monitor/\1defmonitor/g' \ +-e 's/^monitor/defmonitor/g' \ +-e 's/\([ #]\)set[ ]*defmonitor/\1monitor/g' \ +-e 's/^set[ ]*defmonitor/monitor/g' \ +-e 's/\([ #]\)login/\1deflogin/g' \ +-e 's/^login/deflogin/g' \ +-e 's/\([ #]\)set[ ]*deflogin/\1login/g' \ +-e 's/^set[ ]*deflogin/login/g' \ +-e 's/\([ #]\)wrap/\1defwrap/g' \ +-e 's/^wrap/defwrap/g' \ +-e 's/\([ #]\)set[ ]*defwrap/\1wrap/g' \ +-e 's/^set[ ]*defwrap/wrap/g' \ +-e 's/\([ #]\)scrollback/\1defscrollback/g' \ +-e 's/^scrollback/defscrollback/g' \ +-e 's/\([ #]\)set[ ]*defscrollback/\1scrollback/g' \ +-e 's/^set[ ]*defscrollback/scrollback/g' \ +-e 's/\([ #]\)refresh/\1allPARtial/g' \ +-e 's/^refresh/allPARtial/g' \ +-e 's/\([ #]\)redraw/\1allPARtial/g' \ +-e 's/^redraw/allPARtial/g' \ +-e 's/\([ #]\)set[ ]*allPARtial/\1PARtial/g' \ +-e 's/^set[ ]*allPARtial/PARtial/g' \ +-e 's/\([ #]\)visualbell/\1vbell/g' \ +-e 's/^visualbell/vbell/g' \ +-e 's/PARtial\([ ]*\)on/partial\1off/g' \ +-e 's/PARtial\([ ]*\)off/partial\1on/g' \ +-e 's/allPARtial/refresh/g' \ +-e 's/^set[ ]//g' + |