Skip to content

Commit f53f8eb

Browse files
committed
Fix run scripts
1 parent 67344d8 commit f53f8eb

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

PrimeCPP/solution_2/run.cmd

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1+
@echo off
2+
13
IF "%1" == "" || "%1" == "1" || "%1" == "array" (
4+
ECHO Building and running the array approach...
5+
ECHO(
26
g++ -Ofast PrimeCPP_array.cpp -std=c++17 -lstdc++ -oPrimes_array.exe
37
.\Primes_array.exe
8+
ECHO(
49
)
510

611
IF "%1" == "" || "%1" == "2" || "%1" == "mask" (
12+
ECHO Building and running the mask approach...
13+
ECHO(
714
g++ -Ofast PrimeCPP_mask.cpp -std=c++17 -lstdc++ -oPrimes_mask.exe
815
.\Primes_mask.exe
16+
ECHO(
917
)

PrimeCPP/solution_2/run.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@
44
# gcc -Ofast -std=c++17 PrimeCPP.cpp -lc++ -oPrimes_gcc.exe
55
# clang -Ofast -std=c++17 -lc++ PrimeCPP.cpp -oPrimes_clang.exe
66

7-
if [[ "$#" -eq "0" -o "$1" -eq "1" -o "$1" -eq "array" ]]; then
8-
echo "Building and running the array approach"
7+
if [[ $# == 0 || $1 == 1 || $1 == array ]]; then
8+
echo -e "Building and running the array approach...\n"
99
clang++ -march=native -mtune=native -pthread -Ofast -std=c++17 PrimeCPP_array.cpp -oprimes_array.exe
1010
./primes_array.exe
11+
echo
1112
fi
1213

13-
if [[ "$#" -eq "0" -o "$1" -eq "2" -o "$1" -eq "mask" ]]; then
14-
echo "Building and running the mask approach"
14+
if [[ $# == 0 || $1 == 2 || $1 == mask ]]; then
15+
echo -e "Building and running the mask approach...\n"
1516
clang++ -march=native -mtune=native -pthread -Ofast -std=c++17 PrimeCPP_mask.cpp -oprimes_mask.exe
1617
./primes_mask.exe
18+
echo
1719
fi

0 commit comments

Comments
 (0)