diff options
author | mhsn <mail@mhsn.net> | 2025-04-23 11:06:50 +0100 |
---|---|---|
committer | mhsn <mail@mhsn.net> | 2025-04-23 11:06:50 +0100 |
commit | 277af786610b02c47c2be1346261d92da2eabd82 (patch) | |
tree | aa57a080bb31e97cec41a9368352e0f4cf0b7f96 | |
parent | 5701aec839ee58a706b84865f316edf90356ed86 (diff) | |
download | aoc-277af786610b02c47c2be1346261d92da2eabd82.tar.gz aoc-277af786610b02c47c2be1346261d92da2eabd82.zip |
run shfmt
-rwxr-xr-x | bench | 3 | ||||
-rwxr-xr-x | check | 1 | ||||
-rwxr-xr-x | init | 6 |
3 files changed, 4 insertions, 6 deletions
@@ -13,10 +13,9 @@ aoc_path=$script_path/$1/$2 data_path="$aoc_path/data/$4.txt" # Check it is correct -$script_path/check $1 $2 $3 $4 > /dev/null +$script_path/check $1 $2 $3 $4 >/dev/null [ ! $? ] && echo "Incorrect solution" && exit 1 - if [ $lang = "python" ]; then exec="python $aoc_path/python/main.py" elif [ $lang = "rust" ]; then @@ -5,7 +5,6 @@ day=$2 lang=$3 input=$4 - script=$(readlink -f "$0") script_path=$(dirname "$script") @@ -16,7 +16,7 @@ if [ ! -d $aoc_path/data ]; then for f in "test" "aoc"; do touch "$aoc_path/puzzle.txt" touch "$aoc_path/data/$f.txt" - echo "silver: ???\ngold: ???" > "$aoc_path/data/$f.ans" + echo "silver: ???\ngold: ???" >"$aoc_path/data/$f.ans" done fi @@ -24,12 +24,12 @@ fi if [ ! -d $aoc_path/python ]; then mkdir --parents $aoc_path/python cp "$script_path/template/main.py" "$aoc_path/python/main.py" - echo "*" > "$aoc_path/python/.gitignore" + echo "*" >"$aoc_path/python/.gitignore" fi # Rust if [ ! -d $aoc_path/rust ]; then cargo new "$aoc_path/rust" --vcs none --name "aoc_$year-$day" cp "$script_path/template/main.rs" "$aoc_path/rust/src/main.rs" - echo "*" > "$aoc_path/rust/.gitignore" + echo "*" >"$aoc_path/rust/.gitignore" fi |