summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormhsn <mail@mhsn.net>2025-03-19 23:02:51 +0000
committermhsn <mail@mhsn.net>2025-03-19 23:02:51 +0000
commit0e7e21c84d4eaec6a93a35fbdeeea75657c2a189 (patch)
tree0c0b61ec406bcc3fca2870339db1a0395382361e
parentf816dc060d6af9e242c64f668d0b865dba54137d (diff)
downloadaoc-0e7e21c84d4eaec6a93a35fbdeeea75657c2a189.tar.gz
aoc-0e7e21c84d4eaec6a93a35fbdeeea75657c2a189.zip
POSIXify init
-rwxr-xr-xinit8
1 files changed, 4 insertions, 4 deletions
diff --git a/init b/init
index c2da70f..f1374ff 100755
--- a/init
+++ b/init
@@ -1,4 +1,4 @@
-#!/usr/bin/env yash
+#!/usr/bin/env sh
year=$1
day=$2
@@ -10,7 +10,7 @@ aoc_path=$script_path/$1/$2
mkdir --parents $aoc_path
-if [[ ! -d $aoc_path/data ]]; then
+if [ ! -d $aoc_path/data ]; then
# Data directory
mkdir --parents $aoc_path/data
for f in "test" "aoc"; do
@@ -21,14 +21,14 @@ if [[ ! -d $aoc_path/data ]]; then
fi
# Python
-if [[ ! -d $aoc_path/python ]]; then
+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"
fi
# Rust
-if [[ ! -d $aoc_path/rust ]]; then
+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"