Skip to content

Commit

Permalink
Test explicitly mawk 1.3.3 #120
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Jan 25, 2023
1 parent fa74533 commit 0ec76cb
Showing 1 changed file with 46 additions and 33 deletions.
79 changes: 46 additions & 33 deletions Makesurefile
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ in_begin && $1 ~ /^split/ { next }
@doc tests with all awks
@depends_on tested
@depends_on tested_bwk
@depends_on tested_mawk
@depends_on tested_mawk133
@depends_on tested_mawk134
@depends_on tested_gawk51
@depends_on tested_gawk511
Expand All @@ -191,6 +191,10 @@ in_begin && $1 ~ /^split/ { next }
@depends_on installed_bwk
AWK="$(pwd)/soft/bwk" ./makesure_dev tested

@goal tested_mawk133 @private
@depends_on installed_mawk133
AWK="$(pwd)/soft/mawk133" ./makesure_dev tested

@goal tested_mawk134 @private
@depends_on installed_mawk134
AWK="$(pwd)/soft/mawk134" ./makesure_dev tested
Expand All @@ -215,14 +219,6 @@ in_begin && $1 ~ /^split/ { next }
@depends_on installed_goawk_branch
AWK="$(pwd)/soft/$GOAWK_BRANCH_EXE" ./makesure_dev tested

@goal tested_mawk @private
if [[ -x /usr/bin/mawk ]]
then
AWK="/usr/bin/mawk" ./makesure_dev tested
else
echo "No default mawk... Skipped testing it."
fi

#@goal tested_busybox
# AWK="busybox awk" ./makesure_dev tested

Expand All @@ -231,6 +227,7 @@ in_begin && $1 ~ /^split/ { next }
@depends_on installed_bwk
@depends_on installed_gawk51
@depends_on installed_gawk511
@depends_on installed_mawk133
@depends_on installed_mawk134
@depends_on installed_goawk

Expand Down Expand Up @@ -261,6 +258,38 @@ in_begin && $1 ~ /^split/ { next }
./bwk --version
rm -r awk-master

@lib mawk
install_mawk() {
local version="$1"
local tgz="$2"

local exeName="mawk${version//./}"

echo
echo "Fetching Mawk $version..."
echo

cd "soft"

wget "https://invisible-island.net/archives/mawk/$tgz"
tar xzvf "$tgz"
rm "$tgz"

echo
echo "Compile Mawk $version..."
echo

cd mawk-"$version"-*

./configure && make

mv mawk ../$exeName

cd ..
./$exeName -W version
rm -r mawk-"$version"-*
}

@lib gawk
install_gawk() {
local version="$1"
Expand Down Expand Up @@ -326,33 +355,17 @@ in_begin && $1 ~ /^split/ { next }
@use_lib gawk
install_gawk 5.2.1 gawk521

@goal installed_mawk133 @private
@reached_if [[ -f soft/mawk133 ]]
@depends_on soft_folder_created
@use_lib mawk
install_mawk 1.3.3 'mawk-1.3.3-20080909.tgz'

@goal installed_mawk134 @private
@reached_if [[ -f soft/mawk134 ]]
@depends_on soft_folder_created
echo
echo "Fetching Mawk 1.3.4..."
echo

cd "soft"

F=mawk.tar.gz
wget "https://invisible-island.net/datafiles/release/$F"
tar xzvf "$F"
rm "$F"

echo
echo "Compile Mawk 1.3.4..."
echo

cd mawk-1.3.4-*

./configure && make

mv mawk ../mawk134

cd ..
./mawk134 -W version
rm -r mawk-1.3.4-*
@use_lib mawk
install_mawk 1.3.4 'mawk-1.3.4-20200120.tgz'

@goal installed_goawk @private
@reached_if [[ -f soft/$GOAWK ]]
Expand Down

0 comments on commit 0ec76cb

Please sign in to comment.