move out and improve
This commit is contained in:
18
Makefile
18
Makefile
@@ -14,3 +14,21 @@ stow:
|
||||
# sudo ln -s ${HOME}/.zshrc /root/
|
||||
# sudo ln -s ${HOME}/.p10k.zsh /root/
|
||||
# sudo ln -s ${HOME}/.docker_aliases /root/
|
||||
|
||||
LN := ln -svf
|
||||
|
||||
LNDIR := ln -sv
|
||||
|
||||
# all: nvim zsh
|
||||
|
||||
DOTFILES_DIR := $(shell pwd)
|
||||
TARGET_DIR := $(HOME)
|
||||
|
||||
.PHONY: nvim
|
||||
nvim:
|
||||
rm -rf $(TARGET_DIR)/.config/nvim
|
||||
$(LNDIR) $(DOTFILES_DIR)/nvim/.config/nvim $(TARGET_DIR)/.config/nvim
|
||||
|
||||
# zsh:
|
||||
# $(LN) ./zsh/.zshrc ~/.zshrc
|
||||
# $(LN) ./zsh/.zprofile ~/.zprofile
|
||||
|
||||
69
aliases
Normal file
69
aliases
Normal file
@@ -0,0 +1,69 @@
|
||||
cc-clean(){
|
||||
rm -rf *.out
|
||||
}
|
||||
|
||||
cc-run(){
|
||||
local file
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: cc-run <file> [args...]" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
cc-clean
|
||||
|
||||
file="$1"
|
||||
shift
|
||||
|
||||
cc -std=c99 "${file}" -o "${file}.out" -Wall -Wextra -Werror && \
|
||||
"./${file}.out" "$@"
|
||||
}
|
||||
|
||||
cc-run-test(){
|
||||
local file
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: cc-run <file> [args...]" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
cc-clean
|
||||
|
||||
file="$1"
|
||||
shift
|
||||
|
||||
cc -std=c99 "${file}" -o "${file}.out" -Wall -Wextra -Werror -DTEST=please && \
|
||||
"./${file}.out" "$@"
|
||||
}
|
||||
|
||||
|
||||
cc-run-lax(){
|
||||
local file
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: cc-run <file> [args...]" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
cc-clean
|
||||
|
||||
file="$1"
|
||||
shift
|
||||
|
||||
cc -std=c99 "${file}" -o "${file}.out" -DTEST=please && \
|
||||
"./${file}.out" "$@"
|
||||
}
|
||||
|
||||
cc-test(){
|
||||
local test base
|
||||
cc-clean
|
||||
if ! ls *_test.c >/dev/null 2>&1; then
|
||||
echo "No _test.c files found" >&2
|
||||
return 1
|
||||
fi
|
||||
for test in *_test.c; do
|
||||
base="${test%.c}"
|
||||
cc "${test}" -o "${base}.out" -Wall -Wextra -Werror
|
||||
done
|
||||
for test in *_test.out; do
|
||||
"./${test}"
|
||||
done
|
||||
# cc-clean
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
require("romanzy")
|
||||
|
||||
print("custom config initialized")
|
||||
print("hi codam")
|
||||
|
||||
Reference in New Issue
Block a user