adjusted makefile to support multifile sources
This commit is contained in:
39
Makefile
39
Makefile
@@ -1,20 +1,37 @@
|
|||||||
|
|
||||||
OUT_DIR = ./output
|
OUTPUT := output
|
||||||
SRC_FILES = $(wildcard *.md)
|
SINGLE := $(wildcard *.md)
|
||||||
OUT_FILES = $(SRC_FILES:.md=.pdf)
|
MULTI := $(wildcard *.txt)
|
||||||
TARGETS = $(SRC_FILES:.md=)
|
TARGET_S := $(SINGLE:.md=)
|
||||||
|
TARGET_M := $(MULTI:.txt=)
|
||||||
|
|
||||||
PANDOC_OPT = --standalone
|
PANDOC_OPT = --standalone \
|
||||||
|
-V linkcolor:blue \
|
||||||
|
-V geometry:a4paper \
|
||||||
|
-V geometry:margin=2cm \
|
||||||
|
-V monofont="JetBrainsMono Nerd Font" \
|
||||||
|
--pdf-engine=xelatex
|
||||||
|
|
||||||
.PHONY: all clean test
|
.PHONY: all clean out_dir test $(DIRECTORIES)
|
||||||
|
|
||||||
all: $(TARGETS)
|
all: $(TARGET_S) $(TARGETS_M)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(OUT_DIR)/*
|
rm -f $(OUTPUT)/*
|
||||||
|
|
||||||
$(TARGETS): %: $(OUT_DIR)/%.pdf
|
test:
|
||||||
|
@echo "test test :)"
|
||||||
|
@echo "$(MULTI)"
|
||||||
|
|
||||||
|
$(TARGET_S): out_dir
|
||||||
|
@pandoc $(PANDOC_OPT) $@.md -o $(OUTPUT)/$@.pdf
|
||||||
|
|
||||||
|
$(TARGET_M): out_dir
|
||||||
|
@pandoc $(PANDOC_OPT) $(shell cat $@.txt | xargs) -o $(OUTPUT)/$@.pdf
|
||||||
|
|
||||||
|
out_dir:
|
||||||
|
@if [[ ! -d $(OUTPUT) ]]; then\
|
||||||
|
mkdir $(OUTPUT);\
|
||||||
|
fi
|
||||||
|
|
||||||
$(OUT_DIR)/%.pdf: %.md
|
|
||||||
pandoc $(PANDOC_OPT) $^ -o $@
|
|
||||||
|
|
||||||
|
|||||||
3
git.md
3
git.md
@@ -3,7 +3,6 @@
|
|||||||
## Table of contents
|
## Table of contents
|
||||||
|
|
||||||
- [glossary](#glossary)
|
- [glossary](#glossary)
|
||||||
- [terminology](#terminology)
|
|
||||||
- [branches](#branches)
|
- [branches](#branches)
|
||||||
- [create a branch](#create-a-branch)
|
- [create a branch](#create-a-branch)
|
||||||
- [submodules](#submodules)
|
- [submodules](#submodules)
|
||||||
@@ -13,7 +12,7 @@
|
|||||||
- [merge](#merge)
|
- [merge](#merge)
|
||||||
- [rebase](#rebase)
|
- [rebase](#rebase)
|
||||||
|
|
||||||
## terminology
|
## glossary
|
||||||
|
|
||||||
| term | description |
|
| term | description |
|
||||||
| :--- | :---------- |
|
| :--- | :---------- |
|
||||||
|
|||||||
5
linux.txt
Normal file
5
linux.txt
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
./linux/linux.md
|
||||||
|
./linux/setup.md
|
||||||
|
./linux/commands.md
|
||||||
|
./linux/permissions.md
|
||||||
|
./linux/terminal.md
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
# Linux commands
|
## Linux commands
|
||||||
|
|
||||||
- [Linux commands](#linux-commands)
|
- [Linux commands](#linux-commands)
|
||||||
- [combine commands with *xargs*](#combine-commands-with-xargs)
|
- [combine commands with *xargs*](#combine-commands-with-xargs)
|
||||||
|
|
||||||
## combine commands with *xargs*
|
### combine commands with *xargs*
|
||||||
|
|
||||||
Some commands (e.g. `chmod`) can't handle input via pipe and require the input as arguments. `xargs` takes the standard input as list of arguments seperated by spaces or newlines and executes the given command with the input parsed to a list of arguments.
|
Some commands (e.g. `chmod`) can't handle input via pipe and require the input as arguments. `xargs` takes the standard input as list of arguments seperated by spaces or newlines and executes the given command with the input parsed to a list of arguments.
|
||||||
|
|
||||||
|
|||||||
@@ -6,3 +6,4 @@ This document collects knowledge, tips and tricks on all things Linux, that don'
|
|||||||
- [Linux commands](linux/commands.md)
|
- [Linux commands](linux/commands.md)
|
||||||
- [Permissions](linux/permissions.md)
|
- [Permissions](linux/permissions.md)
|
||||||
- [Terminal](linux/terminal.md)
|
- [Terminal](linux/terminal.md)
|
||||||
|
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
# permissions
|
## permissions
|
||||||
|
|
||||||
Linux permissions are ordered as follows:
|
Linux permissions are ordered as follows:
|
||||||
- owner
|
- owner
|
||||||
- group
|
- group
|
||||||
- others
|
- others
|
||||||
|
|
||||||
## octal permissions
|
### octal permissions
|
||||||
|
|
||||||
In octal representation the actions (read, write, execute) have the values:
|
In octal representation the actions (read, write, execute) have the values:
|
||||||
- read = 4
|
- read = 4
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Setup and Configuration
|
## Setup and Configuration
|
||||||
|
|
||||||
|
|
||||||
## Locales and Keyboard Layouts
|
### Locales and Keyboard Layouts
|
||||||
|
|
||||||
Use `localectl` to display and configure locales and keyboard layout:
|
Use `localectl` to display and configure locales and keyboard layout:
|
||||||
|
|
||||||
@@ -11,7 +11,8 @@ localectl status
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### configure layout 'US intl. with deadkeys'
|
#### configure layout 'US intl. with deadkeys'
|
||||||
|
|
||||||
To configure `US intl. with deadkeys`, set the following values:
|
To configure `US intl. with deadkeys`, set the following values:
|
||||||
```sh
|
```sh
|
||||||
X11 Layout: us
|
X11 Layout: us
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
# Terminal
|
## Terminal
|
||||||
|
|
||||||
- [ANSI escape sequences](#ansi-escape-sequences)
|
- [ANSI escape sequences](#ansi-escape-sequences)
|
||||||
|
|
||||||
|
|
||||||
## ANSI escape sequences
|
### ANSI escape sequences
|
||||||
|
|
||||||
Ansi escape sequences are used to format output in a terminal. They **are prefixed with an escape character**, which can be written in a few ways:
|
Ansi escape sequences are used to format output in a terminal. They **are prefixed with an escape character**, which can be written in a few ways:
|
||||||
|
|
||||||
- Ctrl-Key `^[`
|
- Ctrl-Key `^[`
|
||||||
- Octal `\033` (\0 for octal)
|
- Octal `\033` (\0 for octal)
|
||||||
- Hexadecimal `\x1B` (\x for hexadecimal)
|
- Hexadecimal `\x1B` (\\x for hexadecimal)
|
||||||
- Unicode `\u001b
|
- Unicode `\u001b`
|
||||||
|
|
||||||
The sequences is started with a `[` followed by the command and arguments. Arguments are separated with `;`. **Sequences are terminated with `m`.**
|
The sequences is started with a `[` followed by the command and arguments. Arguments are separated with `;`. **Sequences are terminated with `m`.**
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ The sequences is started with a `[` followed by the command and arguments. Argum
|
|||||||
```
|
```
|
||||||
|
|
||||||
For the following tables we define `ESC = \x1B`
|
For the following tables we define `ESC = \x1B`
|
||||||
### Text Style
|
#### Text Style
|
||||||
|
|
||||||
| ESC Code Sequence | Reset Sequence | Description |
|
| ESC Code Sequence | Reset Sequence | Description |
|
||||||
| :---------------- | :------------- | :---------- |
|
| :---------------- | :------------- | :---------- |
|
||||||
@@ -39,12 +39,12 @@ For the following tables we define `ESC = \x1B`
|
|||||||
|
|
||||||
> **Note:** Both dim and bold modes are reset with the `ESC[22m` sequence. The `ESC[21m` sequence is a non-specified sequence for double underline mode and only works in some terminals and is reset with `ESC[24m`.
|
> **Note:** Both dim and bold modes are reset with the `ESC[22m` sequence. The `ESC[21m` sequence is a non-specified sequence for double underline mode and only works in some terminals and is reset with `ESC[24m`.
|
||||||
|
|
||||||
### Color codes
|
#### Color codes
|
||||||
|
|
||||||
Most terminals support 8 and 16 colors, as well as 256 (8-bit) colors. These colors are set by the user, but have commonly defined meanings.
|
Most terminals support 8 and 16 colors, as well as 256 (8-bit) colors. These colors are set by the user, but have commonly defined meanings.
|
||||||
|
|
||||||
|
|
||||||
#### 8-16 Colors
|
##### 8-16 Colors
|
||||||
|
|
||||||
| Color Name | Foreground Color Code | Background Color Code |
|
| Color Name | Foreground Color Code | Background Color Code |
|
||||||
| :--------- | :-------------------- | :-------------------- |
|
| :--------- | :-------------------- | :-------------------- |
|
||||||
@@ -83,7 +83,7 @@ Terminals that support the [aixterm specification](https://sites.ualberta.ca/dep
|
|||||||
| Bright Cyan | `96` | `106` |
|
| Bright Cyan | `96` | `106` |
|
||||||
| Bright White | `97` | `107` |
|
| Bright White | `97` | `107` |
|
||||||
|
|
||||||
#### 256 Colors
|
##### 256 Colors
|
||||||
|
|
||||||
The following escape codes tells the terminal to use the given color ID:
|
The following escape codes tells the terminal to use the given color ID:
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ The final 24 colors (232-255) are grayscale starting from a shade slighly lighte
|
|||||||
|
|
||||||
Some emulators interpret these steps as linear increments (`256 / 24`) on all three channels, although some emulators may explicitly define these values.
|
Some emulators interpret these steps as linear increments (`256 / 24`) on all three channels, although some emulators may explicitly define these values.
|
||||||
|
|
||||||
#### RGB Colors
|
##### RGB Colors
|
||||||
|
|
||||||
More modern terminals supports [Truecolor](https://en.wikipedia.org/wiki/Color_depth#True_color_.2824-bit.29) (24-bit RGB), which allows you to set foreground and background colors using RGB.
|
More modern terminals supports [Truecolor](https://en.wikipedia.org/wiki/Color_depth#True_color_.2824-bit.29) (24-bit RGB), which allows you to set foreground and background colors using RGB.
|
||||||
|
|
||||||
@@ -115,19 +115,5 @@ These escape sequences are usually not well documented.
|
|||||||
| `ESC[38;2;{r};{g};{b}m` | Set foreground color as RGB. |
|
| `ESC[38;2;{r};{g};{b}m` | Set foreground color as RGB. |
|
||||||
| `ESC[48;2;{r};{g};{b}m` | Set background color as RGB. |
|
| `ESC[48;2;{r};{g};{b}m` | Set background color as RGB. |
|
||||||
|
|
||||||
> Note that `;38` and `;48` corresponds to the 16 color sequence and is interpreted by the terminal to set the foreground and background color respectively. Where as `;2` and `;5` sets the color format.
|
> Note that `38` and `48` corresponds to the 16 color sequence and is interpreted by the terminal to set the foreground and background color respectively. Where as `;2` and `;5` sets the color format.
|
||||||
|
|
||||||
|
|
||||||
#### RGB Colors
|
|
||||||
|
|
||||||
More modern terminals supports [Truecolor](https://en.wikipedia.org/wiki/Color_depth#True_color_.2824-bit.29) (24-bit RGB), which allows you to set foreground and background colors using RGB.
|
|
||||||
|
|
||||||
These escape sequences are usually not well documented.
|
|
||||||
|
|
||||||
| ESC Code Sequence | Description |
|
|
||||||
| :---------------------- | :--------------------------- |
|
|
||||||
| `ESC[38;2;{r};{g};{b}m` | Set foreground color as RGB. |
|
|
||||||
| `ESC[48;2;{r};{g};{b}m` | Set background color as RGB. |
|
|
||||||
|
|
||||||
> Note that `;38` and `;48` corresponds to the 16 color sequence and is interpreted by the terminal to set the foreground and background color respectively. Where as `;2` and `;5` sets the color format.
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user