1
0
mirror of https://github.com/0xAX/linux-insides.git synced 2024-10-31 20:18:56 +00:00
Commit Graph

9 Commits

Author SHA1 Message Date
0xAX
af1a757457
Merge pull request #722 from initBasti/fix_broken_links
Fix broken git hub links
2020-10-11 13:29:17 +06:00
0xAX
71b672ce80
Merge pull request #737 from sjp38/fix_get_all_links_py
Fix get_all_links.py
2020-10-11 13:26:49 +06:00
SeongJae Park
55b4919179 Scripts/get_all_links: Remove unnecessary comment
Signed-off-by: SeongJae Park <sj38.park@gmail.com>
2020-10-03 07:26:28 +02:00
SeongJae Park
ecb9179750 Scripts/get_all_links: Properly close files
`get_all_links.py` opens files for reading urls in those, but do not
closes those.  This commit makes the script to properly close the files.

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
2020-10-03 07:25:10 +02:00
SeongJae Park
50332b3b4b Scripts/latex: Fix shellcheck warnings
Shellcheck[1] gives below warnings for `latex.sh` as below.  Those are
not real problems for now, but fixing those would be helpful for future
update.  This commit therefore fixes those except the shebang position,
as the warning is for Shellcheck itself.

[1] https://www.shellcheck.net/

    $ shellcheck latex.sh
    In latex.sh line 1:
    # latex.sh
    ^-- SC2148: Tips depend on target shell and yours is unknown. Add a
    shebang.

    In latex.sh line 8:
    for D in $(ls ../); do
             ^-- SC2045: Iterating over ls output is fragile. Use globs.

    In latex.sh line 12:
            pandoc ../$D/README.md ../$D/linux-*.md -o build/$D.tex
    --template default
                      ^-- SC2086: Double quote to prevent globbing and word
    splitting.
                                      ^-- SC2086: Double quote to prevent
    globbing and word splitting.
                                                             ^-- SC2086:
    Double quote to prevent globbing and word splitting.

    In latex.sh line 16:
    cd ./build
    ^-- SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

    In latex.sh line 19:
        pdflatex -interaction=nonstopmode $f
                                          ^-- SC2086: Double quote to
    prevent globbing and word splitting.

    In latex.sh line 22:
    cd ../
    ^-- SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
2020-10-02 20:58:42 +02:00
Sebastian Fricke
f1b388dbdb Fix broken git hub links
Replace the following dead github links, with equivalent working ones.

s/ 16f73eb02d | https://github.com/torvalds/linux
s/ 16f73eb02d/ | https://github.com/torvalds/linux
s/ 16f73eb02d/Documentation/security/credentials.txt | https://github.com/torvalds/linux/blob/master/Documentation/security/credentials.rst
s/ 16f73eb02d/Documentation/workqueue.txt | 6f0d349d92/Documentation/core-api/workqueue.rst
s/ 16f73eb02d/arch/x86/entry_entry_64.S | https://github.com/torvalds/linux/blob/master/arch/x86/entry/entry_64.S
s/ 16f73eb02d/arch/x86/include/asm/calling.h | https://github.com/torvalds/linux/blob/master/arch/x86/entry/calling.h
s/ 16f73eb02d/arch/x86/include/asm/pgalloc. | https://github.com/torvalds/linux/blob/master/arch/x86/include/asm/pgalloc.h
s/ 16f73eb02d/arch/x86/include/bitops.h | https://github.com/torvalds/linux/blob/master/arch/x86/include/asm/bitops.h
s/ 16f73eb02d/arch/x86/include/irqflags.h | https://github.com/torvalds/linux/blob/master/arch/x86/include/asm/irqflags.h
s/ 16f73eb02d/arch/x86/include/uapi/asm/msr-index.h | https://github.com/torvalds/linux/blob/master/arch/x86/include/asm/msr-index.h
s/ 16f73eb02d/arch/x86/kernel.setup.c | https://github.com/torvalds/linux/blob/master/arch/x86/kernel/setup.c
s/ 16f73eb02d/arch/x86/kernel/entry_64.S | https://github.com/torvalds/linux/blob/master/arch/x86/entry/entry_64.S
s/ 16f73eb02d/arch/x86/kernel/vsyscall_64.c | https://github.com/torvalds/linux/blob/master/arch/x86/entry/vsyscall/vsyscall_64.c
s/ 16f73eb02d/arch/x86/kernel/vsyscall_emu_64.S | https://github.com/torvalds/linux/blob/master/arch/x86/entry/vsyscall/vsyscall_emu_64.S
s/ 16f73eb02d/blob/arch/x86/kernel/cpu/common.c | https://github.com/torvalds/linux/blob/master/arch/x86/kernel/cpu/common.c
s/ 16f73eb02d/drivers/clocksource_acpi_pm.c | https://github.com/torvalds/linux/blob/master/drivers/clocksource/acpi_pm.c
s/ 16f73eb02d/drivers/i2c/i2c-core.c | https://github.com/torvalds/linux/blob/master/drivers/i2c/i2c-core-base.c
s/ 16f73eb02d/include/asm-generic-sections.h | https://github.com/torvalds/linux/blob/master/include/asm-generic/sections.h
s/ 16f73eb02d/include/context_tracking.h | https://github.com/torvalds/linux/blob/master/include/linux/context_tracking.h
s/ 16f73eb02d/include/mm_types.h | https://github.com/torvalds/linux/blob/master/include/linux/mm_types.h
s/ 16f73eb02d/kernel/apic/io_apic.c | https://github.com/torvalds/linux/blob/master/arch/x86/kernel/apic/io_apic.c
s/ 16f73eb02d/kernel/apic/vector.c | https://github.com/torvalds/linux/blob/master/arch/x86/kernel/apic/vector.c
s/ 16f73eb02d/kernel/cgroup.c | https://github.com/torvalds/linux/blob/master/kernel/cgroup/cgroup.c
s/ 16f73eb02d/kernel/cpuset.c | https://github.com/torvalds/linux/blob/master/kernel/cgroup/cpuset.c
s/ 16f73eb02d/kernel/irqinit.c | https://github.com/torvalds/linux/blob/master/arch/x86/kernel/irqinit.c
s/ 16f73eb02d/kernel/locking/lockdep_insides.h | https://github.com/torvalds/linux/blob/master/kernel/locking/lockdep_internals.h
s/ 16f73eb02d/kernel/tick-common.c | https://github.com/torvalds/linux/blob/master/kernel/time/tick-common.c
s/ 16f73eb02d/kernel/time/tich-sched.c | https://github.com/torvalds/linux/blob/master/kernel/time/tick-sched.c
s/ 16f73eb02d/linux/binfmts.h | https://github.com/torvalds/linux/blob/master/include/linux/binfmts.h
s/ 16f73eb02d/locking/rwsem-xadd.c | https://github.com/torvalds/linux/blob/master/kernel/locking/rwsem.c
s/ 16f73eb02d/mm/block.c | https://github.com/torvalds/linux/blob/master/mm/memblock.c
s/ 16f73eb02d/sched/idle.c | https://github.com/torvalds/linux/blob/master/kernel/sched/idle.c
s/ 16f73eb02d/sound/isa/sscape | https://github.com/torvalds/linux/blob/master/sound/isa/sscape.c

Signed-off-by: Sebastian Fricke <sebastian.fricke.linux@gmail.com>
2020-06-18 17:22:10 +02:00
Sebastian Fricke
2cff4abf08 Gitbook Links: replace old links with new ones
The old links didn't point to valid locations.
Replace the old links with the new links and test those changes with a
small script: https://github.com/initBasti/markdown_link_check .

______________________________________________________________

In order to find and replace the links, I used the following commands:

grep -rwohP '.' -e "\(https\:\/\/0xax.gitbooks.io\/\S*\)" > links.txt
(Find all links recursivly in the project directories and print out the
 only the matches links)

Within links.txt:
Remove the '(' & ')' => :%s/\(//g  and :%s/\)//g
Remove duplicates => :sort u

Test if the links work with:
python3 md_link_check.py --pattern 0xax.gitbook --output-file bad.txt
(https://github.com/initBasti/markdown_link_check)

Create replace commands:
:%s/.*/grep -rl & '.' | xargs sed -i 's#&##g'
Enter replacement URL between the 2nd & 3rd '#'
Execute commands: :w !sh

Signed-off-by: Sebastian Fricke <sebastian.fricke.linux@gmail.com>
2020-05-31 17:23:17 +02:00
Dongliang Mu
0c5ebb0990 move latex.sh to Scripts folder 2018-03-20 14:40:36 -04:00
Dongliang Mu
5d923e14c7 add one script to check one link is live or not 2018-03-17 09:16:55 -04:00