diff options
| author | lonkaars <loek@pipeframe.xyz> | 2023-02-14 18:30:33 +0100 | 
|---|---|---|
| committer | lonkaars <loek@pipeframe.xyz> | 2023-02-14 18:30:33 +0100 | 
| commit | 2bb7c5e97111c7c92dbf682ef49c54a229dfcfce (patch) | |
| tree | 41ea601fd2e4b5fd136ce3f946672da4117919c0 /bertfix | |
| parent | d50c5a1af8be6ae51fec28e8b24dfea5ca591906 (diff) | |
week 3 deel 1
Diffstat (limited to 'bertfix')
| -rwxr-xr-x | bertfix | 23 | 
1 files changed, 23 insertions, 0 deletions
@@ -0,0 +1,23 @@ +#!/bin/sh +# unbertfix: unzip and fix files from bert +# - unzips +# - dos2unix-es +# - fix code format using lazy sed + +INPUT_ZIP="$1" + +unzip -qj "$INPUT_ZIP" +rm -f *.log *.log *.sln *.vcxproj *.vcxproj.filters stdafx.cpp stdafx.h targetver.h +dos2unix -q * +sed -z \ +	-e 's/\n\s*{/ {/g' \ +	-e 's/( /(/g' \ +	-e 's/ )/)/g' \ +	-e 's/    /\t/g' \ +	-e 's/#include "stdafx.h"\n//g' \ +	-e 's/#include "targetver.h"\n//g' \ +	-e 's/\([^\n\t]\)\t\t*/\1 /g' \ +	-e 's/  */ /g' \ +	-e 's/\n\n\n*/\n\n/g' \ +	-i * +  |