Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- git/bin/bash.exe +0 -0
- git/bin/git.exe +0 -0
- git/bin/sh.exe +0 -0
- git/bin/vcruntime140_1.dll +0 -0
- git/cmd/git-receive-pack.exe +0 -0
- git/cmd/git-upload-pack.exe +0 -0
- git/cmd/git.exe +0 -0
- git/cmd/scalar.exe +0 -0
- git/cmd/start-ssh-agent.cmd +83 -0
- git/cmd/start-ssh-pageant.cmd +63 -0
- git/cmd/tig.exe +0 -0
- git/cmd/vcruntime140_1.dll +0 -0
- git/etc/DIR_COLORS +207 -0
- git/etc/bash.bashrc +69 -0
- git/etc/docx2txt.config +70 -0
- git/etc/fstab +6 -0
- git/etc/gitattributes +23 -0
- git/etc/gitconfig +20 -0
- git/etc/inputrc +82 -0
- git/etc/msystem +27 -0
- git/etc/nanorc +353 -0
- git/etc/nsswitch.conf +12 -0
- git/etc/package-versions.txt +172 -0
- git/etc/profile +146 -0
- git/etc/tigrc +502 -0
- git/etc/vimrc +55 -0
- git/usr/bin/addgnupghome +122 -0
- git/usr/bin/applygnupgdefaults +81 -0
- git/usr/bin/arch.exe +0 -0
- git/usr/bin/astextplain +33 -0
- git/usr/bin/b2sum.exe +0 -0
- git/usr/bin/backup +257 -0
- git/usr/bin/base32.exe +0 -0
- git/usr/bin/base64.exe +0 -0
- git/usr/bin/basename.exe +0 -0
- git/usr/bin/basenc.exe +0 -0
- git/usr/bin/bashbug +278 -0
- git/usr/bin/bunzip2.exe +0 -0
- git/usr/bin/bzcat.exe +0 -0
- git/usr/bin/bzcmp +76 -0
- git/usr/bin/bzdiff +76 -0
- git/usr/bin/bzegrep +85 -0
- git/usr/bin/bzfgrep +85 -0
- git/usr/bin/bzgrep +85 -0
- git/usr/bin/bzip2.exe +0 -0
- git/usr/bin/bzip2recover.exe +0 -0
- git/usr/bin/bzless +61 -0
- git/usr/bin/c_rehash +254 -0
- git/usr/bin/captoinfo.exe +0 -0
- git/usr/bin/cat.exe +0 -0
git/bin/bash.exe
ADDED
|
Binary file (47 kB). View file
|
|
|
git/bin/git.exe
ADDED
|
Binary file (46.5 kB). View file
|
|
|
git/bin/sh.exe
ADDED
|
Binary file (47 kB). View file
|
|
|
git/bin/vcruntime140_1.dll
ADDED
|
Binary file (49.8 kB). View file
|
|
|
git/cmd/git-receive-pack.exe
ADDED
|
Binary file (33.4 kB). View file
|
|
|
git/cmd/git-upload-pack.exe
ADDED
|
Binary file (33.4 kB). View file
|
|
|
git/cmd/git.exe
ADDED
|
Binary file (46.5 kB). View file
|
|
|
git/cmd/scalar.exe
ADDED
|
Binary file (46.5 kB). View file
|
|
|
git/cmd/start-ssh-agent.cmd
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@REM Do not use "echo off" to not affect any child calls.
|
| 2 |
+
|
| 3 |
+
@REM Enable extensions, the `verify` call is a trick from the setlocal help
|
| 4 |
+
@VERIFY other 2>nul
|
| 5 |
+
@SETLOCAL EnableDelayedExpansion
|
| 6 |
+
@IF ERRORLEVEL 1 (
|
| 7 |
+
@ECHO Unable to enable extensions
|
| 8 |
+
@GOTO failure
|
| 9 |
+
)
|
| 10 |
+
|
| 11 |
+
@REM Start the ssh-agent if needed by git
|
| 12 |
+
@FOR %%i IN ("git.exe") DO @SET GIT=%%~$PATH:i
|
| 13 |
+
@IF EXIST "%GIT%" @(
|
| 14 |
+
@REM Get the ssh-agent executable
|
| 15 |
+
@FOR %%i IN ("ssh-agent.exe") DO @SET SSH_AGENT=%%~$PATH:i
|
| 16 |
+
@IF NOT EXIST "%SSH_AGENT%" @(
|
| 17 |
+
@FOR %%s IN ("%GIT%") DO @SET GIT_DIR=%%~dps
|
| 18 |
+
@FOR %%s IN ("!GIT_DIR!") DO @SET GIT_DIR=!GIT_DIR:~0,-1!
|
| 19 |
+
@FOR %%s IN ("!GIT_DIR!") DO @SET GIT_ROOT=%%~dps
|
| 20 |
+
@FOR %%s IN ("!GIT_ROOT!") DO @SET GIT_ROOT=!GIT_ROOT:~0,-1!
|
| 21 |
+
@FOR /D %%s in ("!GIT_ROOT!\usr\bin\ssh-agent.exe") DO @SET SSH_AGENT=%%~s
|
| 22 |
+
@IF NOT EXIST "!SSH_AGENT!" @GOTO ssh-agent-done
|
| 23 |
+
)
|
| 24 |
+
@REM Get the ssh-add executable
|
| 25 |
+
@FOR %%s IN ("!SSH_AGENT!") DO @SET BIN_DIR=%%~dps
|
| 26 |
+
@FOR %%s in ("!BIN_DIR!") DO @SET BIN_DIR=!BIN_DIR:~0,-1!
|
| 27 |
+
@FOR /D %%s in ("!BIN_DIR!\ssh-add.exe") DO @SET SSH_ADD=%%~s
|
| 28 |
+
@IF NOT EXIST "!SSH_ADD!" @GOTO ssh-agent-done
|
| 29 |
+
@REM Check if the agent is running
|
| 30 |
+
@FOR /f "tokens=1-2" %%a IN ('tasklist /fi "imagename eq ssh-agent.exe"') DO @(
|
| 31 |
+
@ECHO %%b | @FINDSTR /r /c:"[0-9][0-9]*" > NUL
|
| 32 |
+
@IF "!ERRORLEVEL!" == "0" @(
|
| 33 |
+
@SET SSH_AGENT_PID=%%b
|
| 34 |
+
) else @(
|
| 35 |
+
@REM Unset in the case a user kills the agent while a session is open
|
| 36 |
+
@REM needed to remove the old files and prevent a false message
|
| 37 |
+
@SET SSH_AGENT_PID=
|
| 38 |
+
)
|
| 39 |
+
)
|
| 40 |
+
@REM Connect up the current ssh-agent
|
| 41 |
+
@IF [!SSH_AGENT_PID!] == [] @(
|
| 42 |
+
@ECHO Removing old ssh-agent sockets
|
| 43 |
+
@FOR %%s IN (%USERPROFILE%\.ssh\agent\s.*) DO @DEL /q "%%s" 2>nul
|
| 44 |
+
) ELSE @(
|
| 45 |
+
@ECHO Found ssh-agent at !SSH_AGENT_PID!
|
| 46 |
+
@FOR %%s IN (%USERPROFILE%\.ssh\agent\s.*) DO @(
|
| 47 |
+
@SET SSH_AUTH_SOCK=%%s
|
| 48 |
+
@SET SSH_AUTH_SOCK=!SSH_AUTH_SOCK:%USERPROFILE%=~!
|
| 49 |
+
@SET SSH_AUTH_SOCK=!SSH_AUTH_SOCK:\=/!
|
| 50 |
+
)
|
| 51 |
+
@IF NOT [!SSH_AUTH_SOCK!] == [] @(
|
| 52 |
+
@ECHO Found ssh-agent socket at !SSH_AUTH_SOCK!
|
| 53 |
+
) ELSE (
|
| 54 |
+
@ECHO Failed to find ssh-agent socket
|
| 55 |
+
@SET SSH_AGENT_PID=
|
| 56 |
+
)
|
| 57 |
+
)
|
| 58 |
+
@REM See if we have the key
|
| 59 |
+
@"!SSH_ADD!" -l 1>NUL 2>NUL
|
| 60 |
+
@SET result=!ERRORLEVEL!
|
| 61 |
+
@IF NOT !result! == 0 @(
|
| 62 |
+
@IF !result! == 2 @(
|
| 63 |
+
@ECHO | @SET /p=Starting ssh-agent:
|
| 64 |
+
@FOR /f "tokens=1-2 delims==;" %%a IN ('"!SSH_AGENT!"') DO @(
|
| 65 |
+
@IF NOT [%%b] == [] @SET %%a=%%b
|
| 66 |
+
)
|
| 67 |
+
@ECHO. done
|
| 68 |
+
)
|
| 69 |
+
@"!SSH_ADD!"
|
| 70 |
+
@ECHO.
|
| 71 |
+
)
|
| 72 |
+
)
|
| 73 |
+
|
| 74 |
+
:ssh-agent-done
|
| 75 |
+
:failure
|
| 76 |
+
|
| 77 |
+
@ENDLOCAL & @SET "SSH_AUTH_SOCK=%SSH_AUTH_SOCK%" ^
|
| 78 |
+
& @SET "SSH_AGENT_PID=%SSH_AGENT_PID%"
|
| 79 |
+
|
| 80 |
+
@ECHO %cmdcmdline% | @FINDSTR /l "\"\"" >NUL
|
| 81 |
+
@IF NOT ERRORLEVEL 1 @(
|
| 82 |
+
@CALL cmd %*
|
| 83 |
+
)
|
git/cmd/start-ssh-pageant.cmd
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@REM Do not use "echo off" to not affect any child calls.
|
| 2 |
+
|
| 3 |
+
@REM The goal of this script is to simplify launching `ssh-pageant` at
|
| 4 |
+
@REM logon, typically by dropping a shortcut into the Startup folder, so
|
| 5 |
+
@REM that Pageant (the PuTTY authentication agent) will always be
|
| 6 |
+
@REM accessible. No attempt is made to load SSH keys, since this is
|
| 7 |
+
@REM normally handled directly by Pageant, and no interactive shell
|
| 8 |
+
@REM will be launched.
|
| 9 |
+
@REM
|
| 10 |
+
@REM The `ssh-pageant` utility is launched with the `-r` (reuse socket)
|
| 11 |
+
@REM option, to ensure that only a single running incarnation (per user)
|
| 12 |
+
@REM will be required... instead of launching a separate process for
|
| 13 |
+
@REM every interactive Git Bash session. A side effect of this selection
|
| 14 |
+
@REM is that the SSH_AUTH_SOCK environment variable *must* be set prior
|
| 15 |
+
@REM to running this script, with the value specifying a unix-style socket
|
| 16 |
+
@REM path, and needs to be consistent for all git-related processes. The
|
| 17 |
+
@REM easiest way to do this is to set a persistent USER environment
|
| 18 |
+
@REM variable, which (under Windows 7) can be done via Control Panel
|
| 19 |
+
@REM under System / Advanced System Settings. A typical value would look
|
| 20 |
+
@REM similar to:
|
| 21 |
+
@REM
|
| 22 |
+
@REM SSH_AUTH_SOCK=/tmp/.ssh-pageant-USERNAME
|
| 23 |
+
@REM
|
| 24 |
+
|
| 25 |
+
@REM Enable extensions, the `verify` call is a trick from the setlocal help
|
| 26 |
+
@VERIFY other 2>nul
|
| 27 |
+
@SETLOCAL EnableDelayedExpansion
|
| 28 |
+
@IF ERRORLEVEL 1 (
|
| 29 |
+
@ECHO Unable to enable extensions
|
| 30 |
+
@GOTO failure
|
| 31 |
+
)
|
| 32 |
+
|
| 33 |
+
@REM Ensure that SSH_AUTH_SOCK is set
|
| 34 |
+
@if "x" == "x%SSH_AUTH_SOCK%" @(
|
| 35 |
+
@ECHO The SSH_AUTH_SOCK environment variable must be set prior to running this script. >&2
|
| 36 |
+
@ECHO This is typically configured as a persistent USER variable, using a MSYS2 path for >&2
|
| 37 |
+
@ECHO the ssh-pageant authentication socket as the value. Something similar to: >&2
|
| 38 |
+
@ECHO. >&2
|
| 39 |
+
@ECHO SSH_AUTH_SOCK=/tmp/.ssh-pageant-%USERNAME% >&2
|
| 40 |
+
@GOTO failure
|
| 41 |
+
)
|
| 42 |
+
|
| 43 |
+
@REM Start ssh-pageant if needed by git
|
| 44 |
+
@FOR %%i IN ("git.exe") DO @SET GIT=%%~$PATH:i
|
| 45 |
+
@IF EXIST "%GIT%" @(
|
| 46 |
+
@REM Get the ssh-pageant executable
|
| 47 |
+
@FOR %%i IN ("ssh-pageant.exe") DO @SET SSH_PAGEANT=%%~$PATH:i
|
| 48 |
+
@IF NOT EXIST "%SSH_PAGEANT%" @(
|
| 49 |
+
@FOR %%s IN ("%GIT%") DO @SET GIT_DIR=%%~dps
|
| 50 |
+
@FOR %%s IN ("!GIT_DIR!") DO @SET GIT_DIR=!GIT_DIR:~0,-1!
|
| 51 |
+
@FOR %%s IN ("!GIT_DIR!") DO @SET GIT_ROOT=%%~dps
|
| 52 |
+
@FOR %%s IN ("!GIT_ROOT!") DO @SET GIT_ROOT=!GIT_ROOT:~0,-1!
|
| 53 |
+
@FOR /D %%s in ("!GIT_ROOT!\usr\bin\ssh-pageant.exe") DO @SET SSH_PAGEANT=%%~s
|
| 54 |
+
@IF NOT EXIST "!SSH_PAGEANT!" @GOTO ssh-pageant-done
|
| 55 |
+
)
|
| 56 |
+
)
|
| 57 |
+
|
| 58 |
+
@REM Time to make the donuts!
|
| 59 |
+
@ECHO Starting ssh-pageant...
|
| 60 |
+
@FOR /f "usebackq tokens=1 delims=;" %%o in (`"%SSH_PAGEANT%" -qra %SSH_AUTH_SOCK%`) DO @ECHO %%o
|
| 61 |
+
|
| 62 |
+
:ssh-pageant-done
|
| 63 |
+
:failure
|
git/cmd/tig.exe
ADDED
|
Binary file (47 kB). View file
|
|
|
git/cmd/vcruntime140_1.dll
ADDED
|
Binary file (49.8 kB). View file
|
|
|
git/etc/DIR_COLORS
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Configuration file for dircolors, a utility to help you set the
|
| 2 |
+
# LS_COLORS environment variable used by GNU ls with the --color option.
|
| 3 |
+
|
| 4 |
+
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
| 5 |
+
# Copying and distribution of this file, with or without modification,
|
| 6 |
+
# are permitted provided the copyright notice and this notice are preserved.
|
| 7 |
+
|
| 8 |
+
# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
|
| 9 |
+
# slackware version of dircolors) are recognized but ignored.
|
| 10 |
+
|
| 11 |
+
# Below are TERM entries, which can be a glob patterns, to match
|
| 12 |
+
# against the TERM environment variable to determine if it is colorizable.
|
| 13 |
+
TERM Eterm
|
| 14 |
+
TERM ansi
|
| 15 |
+
TERM *color*
|
| 16 |
+
TERM con[0-9]*x[0-9]*
|
| 17 |
+
TERM cons25
|
| 18 |
+
TERM console
|
| 19 |
+
TERM cygwin
|
| 20 |
+
TERM dtterm
|
| 21 |
+
TERM gnome
|
| 22 |
+
TERM hurd
|
| 23 |
+
TERM jfbterm
|
| 24 |
+
TERM konsole
|
| 25 |
+
TERM kterm
|
| 26 |
+
TERM linux
|
| 27 |
+
TERM linux-c
|
| 28 |
+
TERM mlterm
|
| 29 |
+
TERM putty
|
| 30 |
+
TERM rxvt*
|
| 31 |
+
TERM screen*
|
| 32 |
+
TERM st
|
| 33 |
+
TERM terminator
|
| 34 |
+
TERM tmux*
|
| 35 |
+
TERM vt100
|
| 36 |
+
TERM xterm*
|
| 37 |
+
|
| 38 |
+
# Below are the color init strings for the basic file types.
|
| 39 |
+
# One can use codes for 256 or more colors supported by modern terminals.
|
| 40 |
+
# The default color codes use the capabilities of an 8 color terminal
|
| 41 |
+
# with some additional attributes as per the following codes:
|
| 42 |
+
# Attribute codes:
|
| 43 |
+
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
|
| 44 |
+
# Text color codes:
|
| 45 |
+
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
|
| 46 |
+
# Background color codes:
|
| 47 |
+
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
|
| 48 |
+
#NORMAL 00 # no color code at all
|
| 49 |
+
#FILE 00 # regular file: use no color at all
|
| 50 |
+
RESET 0 # reset to "normal" color
|
| 51 |
+
DIR 01;34 # directory
|
| 52 |
+
LINK 01;36 # symbolic link. (If you set this to 'target' instead of a
|
| 53 |
+
# numerical value, the color is as for the file pointed to.)
|
| 54 |
+
MULTIHARDLINK 00 # regular file with more than one link
|
| 55 |
+
FIFO 40;33 # pipe
|
| 56 |
+
SOCK 01;35 # socket
|
| 57 |
+
DOOR 01;35 # door
|
| 58 |
+
BLK 40;33;01 # block device driver
|
| 59 |
+
CHR 40;33;01 # character device driver
|
| 60 |
+
ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file ...
|
| 61 |
+
MISSING 00 # ... and the files they point to
|
| 62 |
+
SETUID 37;41 # file that is setuid (u+s)
|
| 63 |
+
SETGID 30;43 # file that is setgid (g+s)
|
| 64 |
+
CAPABILITY 30;41 # file with capability
|
| 65 |
+
STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)
|
| 66 |
+
OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
|
| 67 |
+
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
|
| 68 |
+
|
| 69 |
+
# This is for files with execute permission:
|
| 70 |
+
EXEC 01;32
|
| 71 |
+
|
| 72 |
+
# List any file extensions like '.gz' or '.tar' that you would like ls
|
| 73 |
+
# to colorize below. Put the extension, a space, and the color init string.
|
| 74 |
+
# (and any comments you want to add after a '#')
|
| 75 |
+
|
| 76 |
+
# If you use DOS-style suffixes, you may want to uncomment the following:
|
| 77 |
+
#.cmd 01;32 # executables (bright green)
|
| 78 |
+
#.exe 01;32
|
| 79 |
+
#.com 01;32
|
| 80 |
+
#.btm 01;32
|
| 81 |
+
#.bat 01;32
|
| 82 |
+
# Or if you want to colorize scripts even if they do not have the
|
| 83 |
+
# executable bit actually set.
|
| 84 |
+
#.sh 01;32
|
| 85 |
+
#.csh 01;32
|
| 86 |
+
|
| 87 |
+
# archives or compressed (bright red)
|
| 88 |
+
.tar 01;31
|
| 89 |
+
.tgz 01;31
|
| 90 |
+
.arc 01;31
|
| 91 |
+
.arj 01;31
|
| 92 |
+
.taz 01;31
|
| 93 |
+
.lha 01;31
|
| 94 |
+
.lz4 01;31
|
| 95 |
+
.lzh 01;31
|
| 96 |
+
.lzma 01;31
|
| 97 |
+
.tlz 01;31
|
| 98 |
+
.txz 01;31
|
| 99 |
+
.tzo 01;31
|
| 100 |
+
.t7z 01;31
|
| 101 |
+
.zip 01;31
|
| 102 |
+
.z 01;31
|
| 103 |
+
.dz 01;31
|
| 104 |
+
.gz 01;31
|
| 105 |
+
.lrz 01;31
|
| 106 |
+
.lz 01;31
|
| 107 |
+
.lzo 01;31
|
| 108 |
+
.xz 01;31
|
| 109 |
+
.zst 01;31
|
| 110 |
+
.tzst 01;31
|
| 111 |
+
.bz2 01;31
|
| 112 |
+
.bz 01;31
|
| 113 |
+
.tbz 01;31
|
| 114 |
+
.tbz2 01;31
|
| 115 |
+
.tz 01;31
|
| 116 |
+
.deb 01;31
|
| 117 |
+
.rpm 01;31
|
| 118 |
+
.jar 01;31
|
| 119 |
+
.war 01;31
|
| 120 |
+
.ear 01;31
|
| 121 |
+
.sar 01;31
|
| 122 |
+
.rar 01;31
|
| 123 |
+
.alz 01;31
|
| 124 |
+
.ace 01;31
|
| 125 |
+
.zoo 01;31
|
| 126 |
+
.cpio 01;31
|
| 127 |
+
.7z 01;31
|
| 128 |
+
.rz 01;31
|
| 129 |
+
.cab 01;31
|
| 130 |
+
.wim 01;31
|
| 131 |
+
.swm 01;31
|
| 132 |
+
.dwm 01;31
|
| 133 |
+
.esd 01;31
|
| 134 |
+
|
| 135 |
+
# image formats
|
| 136 |
+
.jpg 01;35
|
| 137 |
+
.jpeg 01;35
|
| 138 |
+
.mjpg 01;35
|
| 139 |
+
.mjpeg 01;35
|
| 140 |
+
.gif 01;35
|
| 141 |
+
.bmp 01;35
|
| 142 |
+
.pbm 01;35
|
| 143 |
+
.pgm 01;35
|
| 144 |
+
.ppm 01;35
|
| 145 |
+
.tga 01;35
|
| 146 |
+
.xbm 01;35
|
| 147 |
+
.xpm 01;35
|
| 148 |
+
.tif 01;35
|
| 149 |
+
.tiff 01;35
|
| 150 |
+
.png 01;35
|
| 151 |
+
.svg 01;35
|
| 152 |
+
.svgz 01;35
|
| 153 |
+
.mng 01;35
|
| 154 |
+
.pcx 01;35
|
| 155 |
+
.mov 01;35
|
| 156 |
+
.mpg 01;35
|
| 157 |
+
.mpeg 01;35
|
| 158 |
+
.m2v 01;35
|
| 159 |
+
.mkv 01;35
|
| 160 |
+
.webm 01;35
|
| 161 |
+
.webp 01;35
|
| 162 |
+
.ogm 01;35
|
| 163 |
+
.mp4 01;35
|
| 164 |
+
.m4v 01;35
|
| 165 |
+
.mp4v 01;35
|
| 166 |
+
.vob 01;35
|
| 167 |
+
.qt 01;35
|
| 168 |
+
.nuv 01;35
|
| 169 |
+
.wmv 01;35
|
| 170 |
+
.asf 01;35
|
| 171 |
+
.rm 01;35
|
| 172 |
+
.rmvb 01;35
|
| 173 |
+
.flc 01;35
|
| 174 |
+
.avi 01;35
|
| 175 |
+
.fli 01;35
|
| 176 |
+
.flv 01;35
|
| 177 |
+
.gl 01;35
|
| 178 |
+
.dl 01;35
|
| 179 |
+
.xcf 01;35
|
| 180 |
+
.xwd 01;35
|
| 181 |
+
.yuv 01;35
|
| 182 |
+
.cgm 01;35
|
| 183 |
+
.emf 01;35
|
| 184 |
+
|
| 185 |
+
# https://wiki.xiph.org/MIME_Types_and_File_Extensions
|
| 186 |
+
.ogv 01;35
|
| 187 |
+
.ogx 01;35
|
| 188 |
+
|
| 189 |
+
# audio formats
|
| 190 |
+
.aac 00;36
|
| 191 |
+
.au 00;36
|
| 192 |
+
.flac 00;36
|
| 193 |
+
.m4a 00;36
|
| 194 |
+
.mid 00;36
|
| 195 |
+
.midi 00;36
|
| 196 |
+
.mka 00;36
|
| 197 |
+
.mp3 00;36
|
| 198 |
+
.mpc 00;36
|
| 199 |
+
.ogg 00;36
|
| 200 |
+
.ra 00;36
|
| 201 |
+
.wav 00;36
|
| 202 |
+
|
| 203 |
+
# https://wiki.xiph.org/MIME_Types_and_File_Extensions
|
| 204 |
+
.oga 00;36
|
| 205 |
+
.opus 00;36
|
| 206 |
+
.spx 00;36
|
| 207 |
+
.xspf 00;36
|
git/etc/bash.bashrc
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# To the extent possible under law, the author(s) have dedicated all
|
| 2 |
+
# copyright and related and neighboring rights to this software to the
|
| 3 |
+
# public domain worldwide. This software is distributed without any warranty.
|
| 4 |
+
# You should have received a copy of the CC0 Public Domain Dedication along
|
| 5 |
+
# with this software.
|
| 6 |
+
# If not, see <https://creativecommons.org/publicdomain/zero/1.0/>.
|
| 7 |
+
|
| 8 |
+
# /etc/bash.bashrc: executed by bash(1) for interactive shells.
|
| 9 |
+
|
| 10 |
+
# System-wide bashrc file
|
| 11 |
+
|
| 12 |
+
# Check that we haven't already been sourced.
|
| 13 |
+
([[ -z ${CYG_SYS_BASHRC} ]] && CYG_SYS_BASHRC="1") || return
|
| 14 |
+
|
| 15 |
+
# If not running interactively, don't do anything
|
| 16 |
+
[[ "$-" != *i* ]] && return
|
| 17 |
+
|
| 18 |
+
# If started from sshd, make sure profile is sourced
|
| 19 |
+
if [[ -n "$SSH_CONNECTION" ]] && [[ "$PATH" != *:/usr/bin* ]]; then
|
| 20 |
+
source /etc/profile
|
| 21 |
+
fi
|
| 22 |
+
|
| 23 |
+
# Warnings
|
| 24 |
+
unset _warning_found
|
| 25 |
+
for _warning_prefix in '' ${MINGW_PREFIX}; do
|
| 26 |
+
for _warning_file in ${_warning_prefix}/etc/profile.d/*.warning{.once,}; do
|
| 27 |
+
test -f "${_warning_file}" || continue
|
| 28 |
+
_warning="$(command sed 's/^/\t\t/' "${_warning_file}" 2>/dev/null)"
|
| 29 |
+
if test -n "${_warning}"; then
|
| 30 |
+
if test -z "${_warning_found}"; then
|
| 31 |
+
_warning_found='true'
|
| 32 |
+
echo
|
| 33 |
+
fi
|
| 34 |
+
if test -t 1
|
| 35 |
+
then printf "\t\e[1;33mwarning:\e[0m\n${_warning}\n\n"
|
| 36 |
+
else printf "\twarning:\n${_warning}\n\n"
|
| 37 |
+
fi
|
| 38 |
+
fi
|
| 39 |
+
[[ "${_warning_file}" = *.once ]] && rm -f "${_warning_file}"
|
| 40 |
+
done
|
| 41 |
+
done
|
| 42 |
+
unset _warning_found
|
| 43 |
+
unset _warning_prefix
|
| 44 |
+
unset _warning_file
|
| 45 |
+
unset _warning
|
| 46 |
+
|
| 47 |
+
# If MSYS2_PS1 is set, use that as default PS1;
|
| 48 |
+
# if a PS1 is already set and exported, use that;
|
| 49 |
+
# otherwise set a default prompt
|
| 50 |
+
# of user@host, MSYSTEM variable, and current_directory
|
| 51 |
+
[[ -n "${MSYS2_PS1}" ]] && export PS1="${MSYS2_PS1}"
|
| 52 |
+
# if we have the "High Mandatory Level" group, it means we're elevated
|
| 53 |
+
#if [[ -n "$(command -v getent)" ]] && id -G | grep -q "$(getent -w group 'S-1-16-12288' | cut -d: -f2)"
|
| 54 |
+
# then _ps1_symbol='\[\e[1m\]#\[\e[0m\]'
|
| 55 |
+
# else _ps1_symbol='\$'
|
| 56 |
+
#fi
|
| 57 |
+
case "$(declare -p PS1 2>/dev/null)" in
|
| 58 |
+
'declare -x '*) ;; # okay
|
| 59 |
+
*)
|
| 60 |
+
export PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[35m\]$MSYSTEM\[\e[0m\] \[\e[33m\]\w\[\e[0m\]\n'"${_ps1_symbol}"' '
|
| 61 |
+
;;
|
| 62 |
+
esac
|
| 63 |
+
unset _ps1_symbol
|
| 64 |
+
|
| 65 |
+
# Uncomment to use the terminal colours set in DIR_COLORS
|
| 66 |
+
# eval "$(dircolors -b /etc/DIR_COLORS)"
|
| 67 |
+
|
| 68 |
+
# Fixup git-bash in non login env
|
| 69 |
+
shopt -q login_shell || . /etc/profile.d/git-prompt.sh
|
git/etc/docx2txt.config
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# # User controllable configuration parameters for docx2txt.pl
|
| 2 |
+
#
|
| 3 |
+
# Note:
|
| 4 |
+
# - Ensure that all configuration lines end with single comma (,).
|
| 5 |
+
# - Lines beginning with '#' are comments.
|
| 6 |
+
#
|
| 7 |
+
|
| 8 |
+
#
|
| 9 |
+
# Specify the path to "unzip" command.
|
| 10 |
+
#
|
| 11 |
+
# Windows users should specify this path like
|
| 12 |
+
#
|
| 13 |
+
# 'C:\Cygwin\bin\unzip.exe' (With Windows native perl.exe)
|
| 14 |
+
# Or
|
| 15 |
+
# 'C:/Cygwin/bin/unzip.exe' (With Cygwin/Windows native perl.exe)
|
| 16 |
+
#
|
| 17 |
+
# Default : '/usr/bin/unzip'
|
| 18 |
+
#
|
| 19 |
+
config_unzip => '/usr/bin/unzip',
|
| 20 |
+
|
| 21 |
+
#
|
| 22 |
+
# Specify the commandline option(s) to be supplied to the program specified in
|
| 23 |
+
# config_unzip, that allow silent extraction of specified file from zip archive
|
| 24 |
+
# to console/standard output/pipe.
|
| 25 |
+
#
|
| 26 |
+
# Default : '-p' (for unzip)
|
| 27 |
+
#
|
| 28 |
+
# config_unzip_opts => '-p',
|
| 29 |
+
|
| 30 |
+
#
|
| 31 |
+
# How the newline should be in output text file - "\n" or "\r\n".
|
| 32 |
+
#
|
| 33 |
+
# Default : "\n"
|
| 34 |
+
#
|
| 35 |
+
# config_newLine => "\n",
|
| 36 |
+
|
| 37 |
+
#
|
| 38 |
+
# Line width to use for short line (single line paragraph) justifiction.
|
| 39 |
+
#
|
| 40 |
+
# Default : 80
|
| 41 |
+
#
|
| 42 |
+
# config_lineWidth => 80,
|
| 43 |
+
|
| 44 |
+
#
|
| 45 |
+
# Show hyperlink alongside linked text - [yY/nN]
|
| 46 |
+
#
|
| 47 |
+
# Note: Even if this option is enabled, hyperlinks will be shown only if
|
| 48 |
+
# hyperlink differs from the linked text.
|
| 49 |
+
#
|
| 50 |
+
# Default : N
|
| 51 |
+
#
|
| 52 |
+
config_showHyperLink => "Y",
|
| 53 |
+
|
| 54 |
+
#
|
| 55 |
+
# Directory for creation of temporary file.
|
| 56 |
+
#
|
| 57 |
+
# In case input is provided via STDIN (standard input), it is first stored in a
|
| 58 |
+
# temporary file and then further processing is done using that file.
|
| 59 |
+
# Same path specification rules apply here as in case of config_unzip.
|
| 60 |
+
#
|
| 61 |
+
# Default : "/tmp" (Non-Windows OSes), Environment variable "TEMP" (Windows)
|
| 62 |
+
#
|
| 63 |
+
# config_tempDir => "/path/to/your/temp/directory",
|
| 64 |
+
|
| 65 |
+
#
|
| 66 |
+
# Approximate mapping of twips to character for layout purpose.
|
| 67 |
+
#
|
| 68 |
+
# Default : 120
|
| 69 |
+
#
|
| 70 |
+
config_twipsPerChar => 240,
|
git/etc/fstab
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# For a description of the file format, see the Users Guide
|
| 2 |
+
# https://cygwin.com/cygwin-ug-net/using.html#mount-table
|
| 3 |
+
|
| 4 |
+
# DO NOT REMOVE NEXT LINE. It remove cygdrive prefix from path
|
| 5 |
+
none / cygdrive binary,posix=0,noacl,user 0 0
|
| 6 |
+
none /tmp usertemp binary,posix=0,noacl 0 0
|
git/etc/gitattributes
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.doc diff=astextplain
|
| 2 |
+
*.DOC diff=astextplain
|
| 3 |
+
*.docx diff=astextplain
|
| 4 |
+
*.DOCX diff=astextplain
|
| 5 |
+
*.docm diff=astextplain
|
| 6 |
+
*.DOCM diff=astextplain
|
| 7 |
+
*.dot diff=astextplain
|
| 8 |
+
*.DOT diff=astextplain
|
| 9 |
+
*.dotx diff=astextplain
|
| 10 |
+
*.DOTX diff=astextplain
|
| 11 |
+
*.dotm diff=astextplain
|
| 12 |
+
*.DOTM diff=astextplain
|
| 13 |
+
*.pdf diff=astextplain
|
| 14 |
+
*.PDF diff=astextplain
|
| 15 |
+
*.rtf diff=astextplain
|
| 16 |
+
*.RTF diff=astextplain
|
| 17 |
+
*.ods diff=astextplain
|
| 18 |
+
*.ODS diff=astextplain
|
| 19 |
+
*.odf diff=astextplain
|
| 20 |
+
*.ODF diff=astextplain
|
| 21 |
+
*.odt diff=astextplain
|
| 22 |
+
*.ODT diff=astextplain
|
| 23 |
+
|
git/etc/gitconfig
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[core]
|
| 2 |
+
symlinks = false
|
| 3 |
+
autocrlf = true
|
| 4 |
+
fscache = true
|
| 5 |
+
[color]
|
| 6 |
+
interactive = true
|
| 7 |
+
ui = auto
|
| 8 |
+
[help]
|
| 9 |
+
format = html
|
| 10 |
+
[diff "astextplain"]
|
| 11 |
+
textconv = astextplain
|
| 12 |
+
[rebase]
|
| 13 |
+
autosquash = true
|
| 14 |
+
[filter "lfs"]
|
| 15 |
+
clean = git-lfs clean -- %f
|
| 16 |
+
smudge = git-lfs smudge -- %f
|
| 17 |
+
process = git-lfs filter-process
|
| 18 |
+
required = true
|
| 19 |
+
[credential]
|
| 20 |
+
helper = helper-selector
|
git/etc/inputrc
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# none, visible or audible
|
| 2 |
+
set bell-style visible
|
| 3 |
+
|
| 4 |
+
# Ask before displaying >40 items
|
| 5 |
+
# Since $WINDIR $PATH var can be in $PATH, this could list
|
| 6 |
+
# all window executables in C:\WINDOWS
|
| 7 |
+
set completion-query-items 40
|
| 8 |
+
|
| 9 |
+
# Ignore case for the command-line-completion functionality
|
| 10 |
+
# on: default on a Windows style console
|
| 11 |
+
# off: default on a *nix style console
|
| 12 |
+
set completion-ignore-case on
|
| 13 |
+
|
| 14 |
+
# disable/enable 8bit input
|
| 15 |
+
set input-meta on
|
| 16 |
+
set output-meta on
|
| 17 |
+
set convert-meta off
|
| 18 |
+
|
| 19 |
+
# visible-stats
|
| 20 |
+
# Append a mark according to the file type in a listing
|
| 21 |
+
set visible-stats off
|
| 22 |
+
set mark-directories on
|
| 23 |
+
set mark-symlinked-directories on
|
| 24 |
+
|
| 25 |
+
# Beep first, show all only upon double-Tab
|
| 26 |
+
set show-all-if-ambiguous off
|
| 27 |
+
|
| 28 |
+
# MSYSTEM is emacs based
|
| 29 |
+
$if mode=emacs
|
| 30 |
+
# Common to Console & RXVT
|
| 31 |
+
"\e[2;2~": paste-from-clipboard # Shift-Insert
|
| 32 |
+
"\e[5~": beginning-of-history # Page up
|
| 33 |
+
"\e[6~": end-of-history # Page down
|
| 34 |
+
|
| 35 |
+
# Mintty
|
| 36 |
+
"\e[1;5D": "\eOD" # Ctrl-Left
|
| 37 |
+
"\e[1;5C": "\eOC" # Ctrl-Right
|
| 38 |
+
"\e[1;5A": "\eOA" # Ctrl-Up
|
| 39 |
+
"\e[1;5B": "\eOB" # Ctrl-Down
|
| 40 |
+
"\e[1;3D": "\e\e[D" # Alt-Left
|
| 41 |
+
"\e[1;3C": "\e\e[C" # Alt-Right
|
| 42 |
+
|
| 43 |
+
"\e[Z": complete # Shift-Tab
|
| 44 |
+
|
| 45 |
+
$if term=msys # RXVT
|
| 46 |
+
"\e[7~": beginning-of-line # Home Key
|
| 47 |
+
"\e[8~": end-of-line # End Key
|
| 48 |
+
"\e[11~": display-shell-version # F1
|
| 49 |
+
"\e[15~": re-read-init-file # F5
|
| 50 |
+
"\e[12~": "Function Key 2"
|
| 51 |
+
"\e[13~": "Function Key 3"
|
| 52 |
+
"\e[14~": "Function Key 4"
|
| 53 |
+
"\e[17~": "Function Key 6"
|
| 54 |
+
"\e[18~": "Function Key 7"
|
| 55 |
+
"\e[19~": "Function Key 8"
|
| 56 |
+
"\e[20~": "Function Key 9"
|
| 57 |
+
"\e[21~": "Function Key 10"
|
| 58 |
+
$else
|
| 59 |
+
# Eh, normal Console is not really cygwin anymore, is it? Using 'else' instead. -mstormo
|
| 60 |
+
# $if term=cygwin # Console
|
| 61 |
+
"\e[1~": beginning-of-line # Home Key
|
| 62 |
+
"\e[4~": end-of-line # End Key
|
| 63 |
+
"\e[3~": delete-char # Delete Key
|
| 64 |
+
"\e[1;5D": backward-word # Ctrl-Left
|
| 65 |
+
"\e[1;5C": forward-word # Ctrl-Right
|
| 66 |
+
"\e\e[C": forward-word # Alt-Right
|
| 67 |
+
"\e\e[D": backward-word # Alt-Left
|
| 68 |
+
"\e[17~": "Function Key 6"
|
| 69 |
+
"\e[18~": "Function Key 7"
|
| 70 |
+
"\e[19~": "Function Key 8"
|
| 71 |
+
"\e[20~": "Function Key 9"
|
| 72 |
+
"\e[21~": "Function Key 10"
|
| 73 |
+
"\e[23~": "Function Key 11"
|
| 74 |
+
$endif
|
| 75 |
+
|
| 76 |
+
$if term=cygwin
|
| 77 |
+
"\e[A": previous-history # Cursor Up
|
| 78 |
+
"\e[B": next-history # Cursor Down
|
| 79 |
+
"\e[C": forward-char # Cursor Right
|
| 80 |
+
"\e[D": backward-char # Cursor Left
|
| 81 |
+
$endif
|
| 82 |
+
$endif
|
git/etc/msystem
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# MSYSTEM Environment Information
|
| 2 |
+
# Copyright (C) 2016 Renato Silva
|
| 3 |
+
# Licensed under public domain
|
| 4 |
+
|
| 5 |
+
# Once sourced, this script provides common information associated with the
|
| 6 |
+
# current MSYSTEM. For example, the compiler architecture and host type.
|
| 7 |
+
|
| 8 |
+
# The MSYSTEM_ prefix is used for avoiding too generic names. For example,
|
| 9 |
+
# makepkg is sensitive to the value of CARCH, so MSYSTEM_CARCH is defined
|
| 10 |
+
# instead. The MINGW_ prefix does not influence makepkg-mingw variables and
|
| 11 |
+
# is not used for the MSYS shell.
|
| 12 |
+
|
| 13 |
+
export MSYSTEM="${MSYSTEM:-MSYS}"
|
| 14 |
+
|
| 15 |
+
unset MSYSTEM_PREFIX
|
| 16 |
+
unset MSYSTEM_CARCH
|
| 17 |
+
unset MSYSTEM_CHOST
|
| 18 |
+
|
| 19 |
+
unset MINGW_CHOST
|
| 20 |
+
unset MINGW_PREFIX
|
| 21 |
+
unset MINGW_PACKAGE_PREFIX
|
| 22 |
+
|
| 23 |
+
if [ -e "/etc/msystem.d/${MSYSTEM}" ]; then
|
| 24 |
+
source "/etc/msystem.d/${MSYSTEM}"
|
| 25 |
+
else
|
| 26 |
+
source "/etc/msystem.d/MSYS"
|
| 27 |
+
fi
|
git/etc/nanorc
ADDED
|
@@ -0,0 +1,353 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## Sample initialization file for GNU nano.
|
| 2 |
+
##
|
| 3 |
+
## For the options that take parameters, the default value is shown.
|
| 4 |
+
## Other options are unset by default. To make sure that an option
|
| 5 |
+
## is disabled, you can use "unset <option>".
|
| 6 |
+
##
|
| 7 |
+
## Characters that are special in a shell should not be escaped here.
|
| 8 |
+
## Inside string parameters, quotes should not be escaped -- the last
|
| 9 |
+
## double quote on the line will be seen as the closing quote.
|
| 10 |
+
|
| 11 |
+
## If you want ^F, ^B, M-F and M-B to do what they did before version 8.0:
|
| 12 |
+
# bind ^F forward main
|
| 13 |
+
# bind ^B back main
|
| 14 |
+
# bind M-F formatter main
|
| 15 |
+
# bind M-B linter main
|
| 16 |
+
|
| 17 |
+
## Make M-< and M-> switch between buffers, as they did before version 9.0:
|
| 18 |
+
# bind M-< prevbuf main
|
| 19 |
+
# bind M-> nextbuf main
|
| 20 |
+
|
| 21 |
+
## Make 'nextword' (Ctrl+Right) and 'chopwordright' (Ctrl+Delete)
|
| 22 |
+
## stop at word ends instead of at beginnings.
|
| 23 |
+
# set afterends
|
| 24 |
+
|
| 25 |
+
## When soft line wrapping is enabled, make it wrap lines at blanks
|
| 26 |
+
## (tabs and spaces) instead of always at the edge of the screen.
|
| 27 |
+
# set atblanks
|
| 28 |
+
|
| 29 |
+
## Automatically indent a newly created line to the same number of
|
| 30 |
+
## tabs and/or spaces as the preceding line -- or as the next line
|
| 31 |
+
## if the preceding line is the beginning of a paragraph.
|
| 32 |
+
# set autoindent
|
| 33 |
+
|
| 34 |
+
## Back up files to the current filename plus a tilde.
|
| 35 |
+
# set backup
|
| 36 |
+
|
| 37 |
+
## The directory to put unique backup files in.
|
| 38 |
+
# set backupdir ""
|
| 39 |
+
|
| 40 |
+
## Use bold text instead of reverse video text.
|
| 41 |
+
# set boldtext
|
| 42 |
+
|
| 43 |
+
## Treat any line with leading whitespace as the beginning of a paragraph.
|
| 44 |
+
# set bookstyle
|
| 45 |
+
|
| 46 |
+
## The characters treated as closing brackets when justifying paragraphs.
|
| 47 |
+
## This may not include any blank characters. Only closing punctuation,
|
| 48 |
+
## optionally followed by these closing brackets, can end sentences.
|
| 49 |
+
# set brackets ""')>]}"
|
| 50 |
+
|
| 51 |
+
## Automatically hard-wrap the current line when it becomes overlong.
|
| 52 |
+
# set breaklonglines
|
| 53 |
+
|
| 54 |
+
## Do case-sensitive searches by default.
|
| 55 |
+
# set casesensitive
|
| 56 |
+
|
| 57 |
+
## Interpret digits after a colon after a filename (on the command line)
|
| 58 |
+
## as the line number to go to in that file.
|
| 59 |
+
# set colonparsing
|
| 60 |
+
|
| 61 |
+
## Constantly report the cursor position, in the status bar or minibar.
|
| 62 |
+
# set constantshow
|
| 63 |
+
|
| 64 |
+
## Use cut-from-cursor-to-end-of-line by default.
|
| 65 |
+
# set cutfromcursor
|
| 66 |
+
|
| 67 |
+
## Do not use the line below the title bar, leaving it entirely blank.
|
| 68 |
+
# set emptyline
|
| 69 |
+
|
| 70 |
+
## Set the target width for automatic hard-wrapping and for justifying
|
| 71 |
+
## paragraphs. If the specified value is 0 or less, the wrapping point
|
| 72 |
+
## will be the terminal's width minus this number.
|
| 73 |
+
# set fill -8
|
| 74 |
+
|
| 75 |
+
## Draw a vertical stripe at the given column, to help judge text width.
|
| 76 |
+
## (This option does not have a default value.)
|
| 77 |
+
# set guidestripe 75
|
| 78 |
+
|
| 79 |
+
## Remember the used search/replace/command strings for the next session.
|
| 80 |
+
# set historylog
|
| 81 |
+
|
| 82 |
+
## Display a "scrollbar" on the righthand side of the edit window.
|
| 83 |
+
# set indicator
|
| 84 |
+
|
| 85 |
+
## Scroll the buffer contents per half-screen instead of per line.
|
| 86 |
+
# set jumpyscrolling
|
| 87 |
+
|
| 88 |
+
## Display line numbers to the left (and any anchors in the margin).
|
| 89 |
+
# set linenumbers
|
| 90 |
+
|
| 91 |
+
## Let other users (of nano or vim) know that you are editing the file
|
| 92 |
+
## they are trying to edit, and the other way around.
|
| 93 |
+
# set locking
|
| 94 |
+
|
| 95 |
+
## Fall back to slow libmagic to try and determine an applicable syntax.
|
| 96 |
+
# set magic
|
| 97 |
+
|
| 98 |
+
## The opening and closing brackets that are found by a matching-bracket
|
| 99 |
+
## search. This may not contain blank characters. The opening brackets
|
| 100 |
+
## must come before the closing ones, and they must be in the same order.
|
| 101 |
+
# set matchbrackets "(<[{)>]}"
|
| 102 |
+
|
| 103 |
+
## Suppress the title bar and show the filename plus a cursor-position
|
| 104 |
+
## percentage in the space of the status bar.
|
| 105 |
+
# set minibar
|
| 106 |
+
|
| 107 |
+
## Enable mouse support, if available for your system. When enabled,
|
| 108 |
+
## mouse clicks can be used to place the cursor, set the mark (with
|
| 109 |
+
## two clicks), and execute shortcuts. The mouse will work in the
|
| 110 |
+
## X Window System, and on the console when gpm is running.
|
| 111 |
+
# set mouse
|
| 112 |
+
|
| 113 |
+
## Switch on multiple file buffers (inserting a file will put it into
|
| 114 |
+
## a separate buffer).
|
| 115 |
+
# set multibuffer
|
| 116 |
+
|
| 117 |
+
## Don't convert files from DOS/Mac format.
|
| 118 |
+
# set noconvert
|
| 119 |
+
|
| 120 |
+
## Don't display the helpful shortcut lists at the bottom of the screen.
|
| 121 |
+
# set nohelp
|
| 122 |
+
|
| 123 |
+
## Don't automatically add a newline when a file does not end with one.
|
| 124 |
+
# set nonewlines
|
| 125 |
+
|
| 126 |
+
## Set operating directory. nano will not read or write files outside
|
| 127 |
+
## this directory and its subdirectories. Also, the current directory
|
| 128 |
+
## is changed to here, so any files are inserted from this dir. A blank
|
| 129 |
+
## string means the operating-directory feature is turned off.
|
| 130 |
+
# set operatingdir ""
|
| 131 |
+
|
| 132 |
+
## Remember the position of cursor and anchors for the next editing session.
|
| 133 |
+
# set positionlog
|
| 134 |
+
|
| 135 |
+
## Preserve the XON and XOFF keys (^Q and ^S).
|
| 136 |
+
# set preserve
|
| 137 |
+
|
| 138 |
+
## The characters treated as closing punctuation when justifying paragraphs.
|
| 139 |
+
## This may not contain blank characters. Only these terminating characters,
|
| 140 |
+
## optionally followed by closing brackets, can end sentences.
|
| 141 |
+
# set punct "!.?"
|
| 142 |
+
|
| 143 |
+
## Make status-bar messages disappear after 1 keystroke instead of after 20.
|
| 144 |
+
# set quickblank
|
| 145 |
+
|
| 146 |
+
## The regular expression that matches quoting characters in email
|
| 147 |
+
## or line-comment introducers in source code. The default is:
|
| 148 |
+
# set quotestr "^([ ]*([!#%:;>|}]|//))+"
|
| 149 |
+
|
| 150 |
+
## Try to work around a mismatching terminfo terminal description.
|
| 151 |
+
# set rawsequences
|
| 152 |
+
|
| 153 |
+
## Fix Backspace/Delete confusion problem.
|
| 154 |
+
# set rebinddelete
|
| 155 |
+
|
| 156 |
+
## Do regular-expression searches by default.
|
| 157 |
+
## Regular expressions are of the extended type (ERE).
|
| 158 |
+
# set regexp
|
| 159 |
+
|
| 160 |
+
## Save a changed buffer automatically on exit; don't prompt.
|
| 161 |
+
# set saveonexit
|
| 162 |
+
|
| 163 |
+
## Put the cursor on the highlighted item in the file browser, and
|
| 164 |
+
## show the cursor in the help viewer; useful for people who use a
|
| 165 |
+
## braille display and people with poor vision.
|
| 166 |
+
# set showcursor
|
| 167 |
+
|
| 168 |
+
## Make the Home key smarter: when Home is pressed anywhere but at the
|
| 169 |
+
## very beginning of non-whitespace characters on a line, the cursor
|
| 170 |
+
## will jump to that beginning (either forwards or backwards). If the
|
| 171 |
+
## cursor is already at that position, it will jump to the true start
|
| 172 |
+
## of the line (the left edge).
|
| 173 |
+
# set smarthome
|
| 174 |
+
|
| 175 |
+
## Spread overlong lines over multiple screen lines.
|
| 176 |
+
# set softwrap
|
| 177 |
+
|
| 178 |
+
## Scroll only the current line sideways (instead of all lines).
|
| 179 |
+
# set solosidescroll
|
| 180 |
+
|
| 181 |
+
## Use this spelling checker instead of the internal one. This option
|
| 182 |
+
## does not have a default value.
|
| 183 |
+
# set speller "aspell -x -c"
|
| 184 |
+
|
| 185 |
+
## Use the end of the title bar for some state flags: I = auto-indenting,
|
| 186 |
+
## M = mark, L = hard-wrapping long lines, R = recording, S = soft-wrapping.
|
| 187 |
+
# set stateflags
|
| 188 |
+
|
| 189 |
+
## Use this tab size instead of the default; it must be greater than 0.
|
| 190 |
+
# set tabsize 8
|
| 191 |
+
|
| 192 |
+
## Convert each typed tab to the fitting number of spaces.
|
| 193 |
+
# set tabstospaces
|
| 194 |
+
|
| 195 |
+
## Snip whitespace at the end of lines when justifying or hard-wrapping.
|
| 196 |
+
# set trimblanks
|
| 197 |
+
|
| 198 |
+
## Save files by default in Unix format (also when they were DOS or Mac).
|
| 199 |
+
# set unix
|
| 200 |
+
|
| 201 |
+
## The two single-column characters used to display the first characters
|
| 202 |
+
## of tabs and spaces. 187 in ISO 8859-1 (0000BB in Unicode) and 183 in
|
| 203 |
+
## ISO-8859-1 (0000B7 in Unicode) seem to be good values for these.
|
| 204 |
+
## The default when in a UTF-8 locale:
|
| 205 |
+
# set whitespace "»·"
|
| 206 |
+
## The default otherwise:
|
| 207 |
+
# set whitespace ">."
|
| 208 |
+
|
| 209 |
+
## Detect word boundaries differently by treating punctuation
|
| 210 |
+
## characters as parts of words.
|
| 211 |
+
# set wordbounds
|
| 212 |
+
|
| 213 |
+
## The characters (besides alphanumeric ones) that should be considered
|
| 214 |
+
## as parts of words. This option does not have a default value. When
|
| 215 |
+
## set, it overrides option 'set wordbounds'.
|
| 216 |
+
# set wordchars "<_>."
|
| 217 |
+
|
| 218 |
+
## Let an unmodified Backspace or Delete erase the marked region (instead
|
| 219 |
+
## of a single character, and without affecting the cutbuffer).
|
| 220 |
+
# set zap
|
| 221 |
+
|
| 222 |
+
## Hide the bars plus help lines and use the whole terminal as edit area.
|
| 223 |
+
# set zero
|
| 224 |
+
|
| 225 |
+
|
| 226 |
+
## Paint the interface elements of nano. These are examples; there are
|
| 227 |
+
## no colors by default, except for errorcolor and spotlightcolor.
|
| 228 |
+
set titlecolor bold,white,blue
|
| 229 |
+
set promptcolor lightwhite,grey
|
| 230 |
+
set statuscolor bold,white,green
|
| 231 |
+
set errorcolor bold,white,red
|
| 232 |
+
set spotlightcolor black,lightyellow
|
| 233 |
+
set selectedcolor lightwhite,#804
|
| 234 |
+
set stripecolor ,#444
|
| 235 |
+
set scrollercolor slate,#222
|
| 236 |
+
set numbercolor cyan
|
| 237 |
+
set keycolor cyan
|
| 238 |
+
set functioncolor green
|
| 239 |
+
|
| 240 |
+
## In root's .nanorc you might want to use:
|
| 241 |
+
# set titlecolor bold,white,magenta
|
| 242 |
+
# set promptcolor black,yellow
|
| 243 |
+
# set statuscolor bold,white,magenta
|
| 244 |
+
# set errorcolor bold,white,red
|
| 245 |
+
# set spotlightcolor black,orange
|
| 246 |
+
# set selectedcolor lightwhite,cyan
|
| 247 |
+
# set stripecolor ,yellow
|
| 248 |
+
# set scrollercolor magenta
|
| 249 |
+
# set numbercolor magenta
|
| 250 |
+
# set keycolor lightmagenta
|
| 251 |
+
# set functioncolor magenta
|
| 252 |
+
|
| 253 |
+
|
| 254 |
+
## === Syntax coloring ===
|
| 255 |
+
## For all details, see 'man nanorc', section SYNTAX HIGHLIGHTING.
|
| 256 |
+
|
| 257 |
+
## To include most of the existing syntax definitions, you can do:
|
| 258 |
+
include /usr/share/nano/*.nanorc
|
| 259 |
+
|
| 260 |
+
## Or you can select just the ones you need. For example:
|
| 261 |
+
# include /usr/share/nano/html.nanorc
|
| 262 |
+
# include /usr/share/nano/python.nanorc
|
| 263 |
+
# include /usr/share/nano/sh.nanorc
|
| 264 |
+
|
| 265 |
+
## In /usr/share/nano/extra/ you can find some syntaxes that are
|
| 266 |
+
## specific for certain distros or for some less common languages.
|
| 267 |
+
|
| 268 |
+
|
| 269 |
+
## If <Tab> should always produce four spaces when editing a Python file,
|
| 270 |
+
## independent of the settings of 'tabsize' and 'tabstospaces':
|
| 271 |
+
# extendsyntax python tabgives " "
|
| 272 |
+
|
| 273 |
+
|
| 274 |
+
## === Key bindings ===
|
| 275 |
+
## For all details, see 'man nanorc', section REBINDING KEYS.
|
| 276 |
+
|
| 277 |
+
## If you want to suspend nano with one keystroke (instead of with ^T^Z):
|
| 278 |
+
# bind ^Z suspend main
|
| 279 |
+
|
| 280 |
+
## The <Ctrl+Delete> keystroke deletes the word to the right of the cursor.
|
| 281 |
+
## On some terminals the <Ctrl+Backspace> keystroke produces ^H, which is
|
| 282 |
+
## the ASCII character for backspace, so it is bound by default to the
|
| 283 |
+
## backspace function. The <Backspace> key itself produces a different
|
| 284 |
+
## keycode, which is hard-bound to the backspace function. So, if you
|
| 285 |
+
## normally use <Backspace> for backspacing and not ^H, you can make
|
| 286 |
+
## <Ctrl+Backspace> delete the word to the left of the cursor with:
|
| 287 |
+
# bind ^H chopwordleft main
|
| 288 |
+
|
| 289 |
+
## For a more mnemonic Comment keystroke (overriding Cut-from-cursor):
|
| 290 |
+
# bind M-K comment main
|
| 291 |
+
|
| 292 |
+
## If you want ^L to just refresh the screen and not center the cursor:
|
| 293 |
+
# bind ^L refresh main
|
| 294 |
+
|
| 295 |
+
## When you sometimes type M-J instead of M-K, or M-T instead of M-R:
|
| 296 |
+
# unbind M-J main
|
| 297 |
+
# unbind M-T main
|
| 298 |
+
## (Those functions are still accessible through ^T^J and ^T^V.)
|
| 299 |
+
|
| 300 |
+
## For quickly uppercasing or lowercasing the word that the cursor is on.
|
| 301 |
+
## (These effectively select a word and pipe it through a sed command.)
|
| 302 |
+
# bind Sh-M-U "{nextword}{mark}{prevword}{execute}| sed 's/.*/\U&/' {enter}" main
|
| 303 |
+
# bind Sh-M-L "{nextword}{mark}{prevword}{execute}| sed 's/.*/\L&/' {enter}" main
|
| 304 |
+
|
| 305 |
+
## For copying a marked region to the system clipboard:
|
| 306 |
+
# bind Sh-M-C "{execute}| xsel -ib {enter}{undo}" main
|
| 307 |
+
|
| 308 |
+
## For copying text to the local clipboard via OSC 52 (if terminal supports it):
|
| 309 |
+
# bind M-* "{execute}|| printf "\033]52;c;%s\007" "$(base64 | tr -d '\n')" {enter}{undo}" main
|
| 310 |
+
|
| 311 |
+
## For normalizing Unicode to precomposed characters:
|
| 312 |
+
# bind Sh-M-N "{execute}| uconv -x nfc {enter}" main
|
| 313 |
+
|
| 314 |
+
## For wiping all anchors in a buffer:
|
| 315 |
+
# bind Sh-M-W "{execute}| cat {enter}" main
|
| 316 |
+
|
| 317 |
+
## For snipping trailing blanks when you save a file:
|
| 318 |
+
# bind ^S "{execute}| sed 's/\s\+$//' {enter}{savefile}" main
|
| 319 |
+
|
| 320 |
+
## If you would like nano to have keybindings that are more "usual",
|
| 321 |
+
## such as ^O for Open, ^F for Find, ^H for Help, and ^Q for Quit,
|
| 322 |
+
## then uncomment these:
|
| 323 |
+
# bind ^X cut main
|
| 324 |
+
# bind ^C copy main
|
| 325 |
+
# bind ^V paste all
|
| 326 |
+
# bind ^Q exit all
|
| 327 |
+
# bind ^S savefile main
|
| 328 |
+
# bind ^W writeout main
|
| 329 |
+
# bind ^O insert main
|
| 330 |
+
# set multibuffer
|
| 331 |
+
# bind ^H help all
|
| 332 |
+
# bind ^H exit help
|
| 333 |
+
# bind ^F whereis all
|
| 334 |
+
# bind ^G findnext all
|
| 335 |
+
# bind ^B wherewas all
|
| 336 |
+
# bind ^D findprevious all
|
| 337 |
+
# bind ^R replace main
|
| 338 |
+
# unbind ^U all
|
| 339 |
+
# unbind ^N main
|
| 340 |
+
# unbind ^Y all
|
| 341 |
+
# unbind M-J main
|
| 342 |
+
# unbind M-T main
|
| 343 |
+
# bind ^A mark main
|
| 344 |
+
# bind ^P location main
|
| 345 |
+
# bind ^T gotoline main
|
| 346 |
+
# bind ^T gotodir browser
|
| 347 |
+
# bind ^T cutrestoffile execute
|
| 348 |
+
# bind ^L linter execute
|
| 349 |
+
# bind ^E execute main
|
| 350 |
+
# bind ^K "{mark}{end}{zap}" main
|
| 351 |
+
# bind ^U "{mark}{home}{zap}" main
|
| 352 |
+
# bind ^Z undo main
|
| 353 |
+
# bind ^Y redo main
|
git/etc/nsswitch.conf
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Begin /etc/nsswitch.conf
|
| 2 |
+
|
| 3 |
+
passwd: files db
|
| 4 |
+
group: files # db
|
| 5 |
+
|
| 6 |
+
db_enum: cache builtin
|
| 7 |
+
|
| 8 |
+
db_home: env windows cygwin desc
|
| 9 |
+
db_shell: env windows # cygwin desc
|
| 10 |
+
db_gecos: env # cygwin desc
|
| 11 |
+
|
| 12 |
+
# End /etc/nsswitch.conf
|
git/etc/package-versions.txt
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
apr 1.7.6-1
|
| 2 |
+
apr-util 1.6.3-2
|
| 3 |
+
gawk 5.4.0-1
|
| 4 |
+
bash 5.3.009-1
|
| 5 |
+
bzip2 1.0.8-4
|
| 6 |
+
ca-certificates 20250419-1
|
| 7 |
+
coreutils 8.32-5
|
| 8 |
+
diffutils 3.12-1
|
| 9 |
+
docx2txt 1.4-2
|
| 10 |
+
dos2unix 7.5.5-1
|
| 11 |
+
expat 2.7.5-1
|
| 12 |
+
file 5.47-1
|
| 13 |
+
findutils 4.10.0-2
|
| 14 |
+
gcc-libs 15.2.0-1
|
| 15 |
+
gdbm 1.26-1
|
| 16 |
+
gmp 6.3.0-2
|
| 17 |
+
gnupg 2.4.9-1
|
| 18 |
+
grep 1~3.0-7
|
| 19 |
+
gzip 1.14-1
|
| 20 |
+
heimdal-libs 7.8.0-5
|
| 21 |
+
iconv 1.19-1
|
| 22 |
+
less 692-1
|
| 23 |
+
libassuan 3.0.2-1
|
| 24 |
+
libbz2 1.0.8-4
|
| 25 |
+
libcbor 0.11.0-1
|
| 26 |
+
libcurl 8.19.0-1
|
| 27 |
+
libdb 6.2.32-5
|
| 28 |
+
libedit 20240808_3.1-1
|
| 29 |
+
libexpat 2.7.5-1
|
| 30 |
+
libffi 3.5.2-1
|
| 31 |
+
libfido2 1.15.0-1
|
| 32 |
+
libgcrypt 1.12.2-1
|
| 33 |
+
libgdbm 1.26-1
|
| 34 |
+
libgnutls 3.8.4-2
|
| 35 |
+
libgpg-error 1.59-1
|
| 36 |
+
libhogweed 3.10.2-1
|
| 37 |
+
libiconv 1.19-1
|
| 38 |
+
libidn2 2.3.8-1
|
| 39 |
+
libintl 0.22.5-1
|
| 40 |
+
libksba 1.6.8-1
|
| 41 |
+
liblz4 1.10.0-1
|
| 42 |
+
liblzma 5.8.3-1
|
| 43 |
+
libnettle 3.10.2-1
|
| 44 |
+
libnghttp2 1.68.1-1
|
| 45 |
+
libnpth 1.8-1
|
| 46 |
+
libopenssl 3.5.6-1
|
| 47 |
+
libp11-kit 0.26.2-1
|
| 48 |
+
libpcre 8.45-5
|
| 49 |
+
libpcre2_8 10.47-1
|
| 50 |
+
libpcre2posix 10.47-1
|
| 51 |
+
libpsl 0.21.5-2
|
| 52 |
+
libreadline 8.3.003-1
|
| 53 |
+
libsasl 2.1.28-5
|
| 54 |
+
libserf 1.3.10-2
|
| 55 |
+
libsqlite 3.53.0-1
|
| 56 |
+
libssh2 1.11.1-1
|
| 57 |
+
libtasn1 4.21.0-1
|
| 58 |
+
libunistring 1.4.1-1
|
| 59 |
+
libutil-linux 2.40.2-2
|
| 60 |
+
libxcrypt 4.5.2-1
|
| 61 |
+
libzstd 1.5.7-1
|
| 62 |
+
mingw-w64-x86_64-antiword 0.37-3
|
| 63 |
+
mingw-w64-x86_64-brotli 1.2.0-1
|
| 64 |
+
mingw-w64-x86_64-bzip2 1.0.8-3
|
| 65 |
+
mingw-w64-x86_64-c-ares 1.34.6-1
|
| 66 |
+
mingw-w64-x86_64-ca-certificates 20250419-1
|
| 67 |
+
mingw-w64-x86_64-gcc-libs 15.2.0-14
|
| 68 |
+
mingw-w64-x86_64-connect 1.105-5
|
| 69 |
+
mingw-w64-x86_64-curl-winssl 8.19.0-3
|
| 70 |
+
mingw-w64-x86_64-curl-openssl-alternate 8.19.0-3
|
| 71 |
+
mingw-w64-x86_64-curl-winssl 8.19.0-3
|
| 72 |
+
mingw-w64-x86_64-expat 2.7.5-2
|
| 73 |
+
mingw-w64-x86_64-gcc-libs 15.2.0-14
|
| 74 |
+
mingw-w64-x86_64-gettext-runtime 1.0-1
|
| 75 |
+
mingw-w64-x86_64-git 2.54.0.1-1
|
| 76 |
+
mingw-w64-x86_64-git-credential-manager 2.7.3-1
|
| 77 |
+
mingw-w64-x86_64-git-credential-wincred 2.54.0.1-1
|
| 78 |
+
mingw-w64-x86_64-git-doc-html 2.54.0.1-1
|
| 79 |
+
mingw-w64-x86_64-git-extra 1.1.689.fe8c5259c-1
|
| 80 |
+
mingw-w64-x86_64-git-for-windows-addons 2.54.0.1-1
|
| 81 |
+
mingw-w64-x86_64-git-gui 2.54.0.1-1
|
| 82 |
+
mingw-w64-x86_64-git-lfs 3.7.1-1
|
| 83 |
+
mingw-w64-x86_64-git-perl 2.54.0.1-1
|
| 84 |
+
mingw-w64-x86_64-git-send-email 2.54.0.1-1
|
| 85 |
+
mingw-w64-x86_64-git-subtree 2.54.0.1-1
|
| 86 |
+
mingw-w64-x86_64-gitk 2.54.0.1-1
|
| 87 |
+
mingw-w64-x86_64-gmp 6.3.0-2
|
| 88 |
+
mingw-w64-x86_64-gnutls 3.8.4-1
|
| 89 |
+
mingw-w64-x86_64-libffi 3.5.2-1
|
| 90 |
+
mingw-w64-x86_64-libiconv 1.19-1
|
| 91 |
+
mingw-w64-x86_64-libidn2 2.3.8-4
|
| 92 |
+
mingw-w64-x86_64-libpsl 0.21.5-3
|
| 93 |
+
mingw-w64-x86_64-libssh2-wincng 1.11.1-2
|
| 94 |
+
mingw-w64-x86_64-libssh2-wincng 1.11.1-2
|
| 95 |
+
mingw-w64-x86_64-libsystre 1.0.2-2
|
| 96 |
+
mingw-w64-x86_64-libtasn1 4.21.0-1
|
| 97 |
+
mingw-w64-x86_64-libtre 0.9.0-2
|
| 98 |
+
mingw-w64-x86_64-libunistring 1.3-1
|
| 99 |
+
mingw-w64-x86_64-libwinpthread 14.0.0.r14.g4761eabdd-1
|
| 100 |
+
mingw-w64-x86_64-libzip 1.11.4-1
|
| 101 |
+
mingw-w64-x86_64-nettle 3.10.2-1
|
| 102 |
+
mingw-w64-x86_64-nghttp2 1.68.1-1
|
| 103 |
+
mingw-w64-x86_64-odt2txt 0.5-4
|
| 104 |
+
mingw-w64-x86_64-openssl 3.5.6-1
|
| 105 |
+
mingw-w64-x86_64-p11-kit 0.26.2-1
|
| 106 |
+
mingw-w64-x86_64-pcre2 10.47-1
|
| 107 |
+
mingw-w64-x86_64-tcl 8.6.17-1
|
| 108 |
+
mingw-w64-x86_64-tk 8.6.17-2
|
| 109 |
+
mingw-w64-x86_64-tzdata 2026a-1
|
| 110 |
+
mingw-w64-x86_64-wineditline 2.208-1
|
| 111 |
+
mingw-w64-x86_64-xz 5.8.3-1
|
| 112 |
+
mingw-w64-x86_64-zlib 1.3.2-2
|
| 113 |
+
mingw-w64-x86_64-zstd 1.5.7-1
|
| 114 |
+
mintty 1~3.8.2-1
|
| 115 |
+
mpfr 4.2.2-1
|
| 116 |
+
msys2-runtime 3.6.7-4
|
| 117 |
+
nano 9.0-1
|
| 118 |
+
ncurses 6.6-1
|
| 119 |
+
nettle 3.10.2-1
|
| 120 |
+
openssh 10.3p1-1
|
| 121 |
+
openssl 3.5.6-1
|
| 122 |
+
p11-kit 0.26.2-1
|
| 123 |
+
patch 2.7.6-3
|
| 124 |
+
perl 5.42.2-1
|
| 125 |
+
perl-Authen-SASL 2.2000-1
|
| 126 |
+
perl-Clone 0.50-2
|
| 127 |
+
perl-Convert-BinHex 1.125-2
|
| 128 |
+
perl-Encode-Locale 1.05-2
|
| 129 |
+
perl-Error 0.17030-1
|
| 130 |
+
perl-File-Listing 6.16-1
|
| 131 |
+
perl-HTML-Parser 3.83-3
|
| 132 |
+
perl-HTML-Tagset 3.24-1
|
| 133 |
+
perl-HTTP-Cookies 6.11-1
|
| 134 |
+
perl-HTTP-Daemon 6.16-1
|
| 135 |
+
perl-HTTP-Date 6.06-1
|
| 136 |
+
perl-HTTP-Message 7.01-1
|
| 137 |
+
perl-HTTP-Negotiate 6.01-3
|
| 138 |
+
perl-IO-HTML 1.004-2
|
| 139 |
+
perl-IO-Socket-SSL 2.098-1
|
| 140 |
+
perl-IO-Stringy 2.113-3
|
| 141 |
+
perl-JSON 4.11-1
|
| 142 |
+
perl-LWP-MediaTypes 6.04-2
|
| 143 |
+
perl-MIME-tools 5.517-1
|
| 144 |
+
perl-MailTools 2.22-1
|
| 145 |
+
perl-Net-HTTP 6.24-1
|
| 146 |
+
perl-Net-SMTP-SSL 1.04-2
|
| 147 |
+
perl-Net-SSLeay 1.96-1
|
| 148 |
+
perl-TermReadKey 2.38-8
|
| 149 |
+
perl-TimeDate 2.35-1
|
| 150 |
+
perl-Try-Tiny 0.32-1
|
| 151 |
+
perl-URI 5.34-1
|
| 152 |
+
perl-WWW-RobotRules 6.02-3
|
| 153 |
+
perl-http-cookiejar 0.014-1
|
| 154 |
+
perl-libwww 6.82-1
|
| 155 |
+
pinentry 1.3.2-1
|
| 156 |
+
sed 4.9-1
|
| 157 |
+
bash 5.3.009-1
|
| 158 |
+
ssh-pageant 1.4.r15.gc804ba4-1
|
| 159 |
+
subversion 1.14.5-3
|
| 160 |
+
tar 1.35-3
|
| 161 |
+
tig 2.6.0-1
|
| 162 |
+
unzip 6.0-3
|
| 163 |
+
vim 9.2.0357-1
|
| 164 |
+
which 2.23-4
|
| 165 |
+
winpty 0.4.3-3
|
| 166 |
+
zlib 1.3.2-1
|
| 167 |
+
filesystem 2026.03.06-1
|
| 168 |
+
dash 0.5.13.2-1
|
| 169 |
+
rebase 4.5.0-5
|
| 170 |
+
util-linux 2.40.2-2
|
| 171 |
+
unzip 6.0-3
|
| 172 |
+
mingw-w64-x86_64-xpdf-tools 4.00-1
|
git/etc/profile
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# To the extent possible under law, the author(s) have dedicated all
|
| 2 |
+
# copyright and related and neighboring rights to this software to the
|
| 3 |
+
# public domain worldwide. This software is distributed without any warranty.
|
| 4 |
+
# You should have received a copy of the CC0 Public Domain Dedication along
|
| 5 |
+
# with this software.
|
| 6 |
+
# If not, see <https://creativecommons.org/publicdomain/zero/1.0/>.
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
# System-wide profile file
|
| 10 |
+
|
| 11 |
+
# Some resources...
|
| 12 |
+
# Customizing Your Shell: http://www.dsl.org/cookbook/cookbook_5.html#SEC69
|
| 13 |
+
# Consistent BackSpace and Delete Configuration:
|
| 14 |
+
# http://www.ibb.net/~anne/keyboard.html
|
| 15 |
+
# The Linux Documentation Project: https://www.tldp.org/
|
| 16 |
+
# The Linux Cookbook: https://www.tldp.org/LDP/linuxcookbook/html/
|
| 17 |
+
# Greg's Wiki https://mywiki.wooledge.org/
|
| 18 |
+
|
| 19 |
+
# Setup some default paths. Note that this order will allow user installed
|
| 20 |
+
# software to override 'system' software.
|
| 21 |
+
# Modifying these default path settings can be done in different ways.
|
| 22 |
+
# To learn more about startup files, refer to your shell's man page.
|
| 23 |
+
|
| 24 |
+
MSYS2_PATH="/usr/local/bin:/usr/bin:/bin"
|
| 25 |
+
MANPATH='/usr/local/man:/usr/share/man:/usr/man:/share/man'
|
| 26 |
+
INFOPATH='/usr/local/info:/usr/share/info:/usr/info:/share/info'
|
| 27 |
+
|
| 28 |
+
case "${MSYS2_PATH_TYPE:-inherit}" in
|
| 29 |
+
strict)
|
| 30 |
+
# Do not inherit any path configuration, and allow for full customization
|
| 31 |
+
# of external path. This is supposed to be used in special cases such as
|
| 32 |
+
# debugging without need to change this file, but not daily usage.
|
| 33 |
+
unset ORIGINAL_PATH
|
| 34 |
+
;;
|
| 35 |
+
inherit)
|
| 36 |
+
# Inherit previous path. Note that this will make all of the Windows path
|
| 37 |
+
# available in current shell, with possible interference in project builds.
|
| 38 |
+
ORIGINAL_PATH="${ORIGINAL_PATH:-${PATH}}"
|
| 39 |
+
;;
|
| 40 |
+
*)
|
| 41 |
+
# Do not inherit any path configuration but configure a default Windows path
|
| 42 |
+
# suitable for normal usage with minimal external interference.
|
| 43 |
+
WIN_ROOT="$(PATH=${MSYS2_PATH} exec cygpath -Wu)"
|
| 44 |
+
ORIGINAL_PATH="${WIN_ROOT}/System32:${WIN_ROOT}:${WIN_ROOT}/System32/Wbem:${WIN_ROOT}/System32/WindowsPowerShell/v1.0/"
|
| 45 |
+
esac
|
| 46 |
+
|
| 47 |
+
unset MINGW_MOUNT_POINT
|
| 48 |
+
. '/etc/msystem'
|
| 49 |
+
case "${MSYSTEM}" in
|
| 50 |
+
MINGW*|CLANG*|UCRT*)
|
| 51 |
+
MINGW_MOUNT_POINT="${MINGW_PREFIX}"
|
| 52 |
+
PATH="${MINGW_MOUNT_POINT}/bin:${MSYS2_PATH}${ORIGINAL_PATH:+:${ORIGINAL_PATH}}"
|
| 53 |
+
PKG_CONFIG_PATH="${MINGW_MOUNT_POINT}/lib/pkgconfig:${MINGW_MOUNT_POINT}/share/pkgconfig"
|
| 54 |
+
PKG_CONFIG_SYSTEM_INCLUDE_PATH="${MINGW_MOUNT_POINT}/include"
|
| 55 |
+
PKG_CONFIG_SYSTEM_LIBRARY_PATH="${MINGW_MOUNT_POINT}/lib"
|
| 56 |
+
ACLOCAL_PATH="${MINGW_MOUNT_POINT}/share/aclocal:/usr/share/aclocal"
|
| 57 |
+
MANPATH="${MINGW_MOUNT_POINT}/local/man:${MINGW_MOUNT_POINT}/share/man:${MANPATH}"
|
| 58 |
+
INFOPATH="${MINGW_MOUNT_POINT}/local/info:${MINGW_MOUNT_POINT}/share/info:${INFOPATH}"
|
| 59 |
+
;;
|
| 60 |
+
*)
|
| 61 |
+
PATH="${MSYS2_PATH}:/opt/bin${ORIGINAL_PATH:+:${ORIGINAL_PATH}}"
|
| 62 |
+
PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/share/pkgconfig:/lib/pkgconfig"
|
| 63 |
+
esac
|
| 64 |
+
|
| 65 |
+
CONFIG_SITE="/etc/config.site"
|
| 66 |
+
|
| 67 |
+
MAYBE_FIRST_START=false
|
| 68 |
+
if [ ! -d "${HOME}" ]; then
|
| 69 |
+
printf "\e[1;32mMSYS2 is starting for the first time. Executing the initial setup.\e[1;0m\n" 1>&2;
|
| 70 |
+
MAYBE_FIRST_START=true
|
| 71 |
+
fi
|
| 72 |
+
|
| 73 |
+
SYSCONFDIR="${SYSCONFDIR:=/etc}"
|
| 74 |
+
|
| 75 |
+
# TMP and TEMP as defined in the Windows environment must be kept
|
| 76 |
+
# for windows apps, even if started from msys2. However, leaving
|
| 77 |
+
# them set to the default Windows temporary directory or unset
|
| 78 |
+
# can have unexpected consequences for msys2 apps, so we define
|
| 79 |
+
# our own to match GNU/Linux behaviour.
|
| 80 |
+
ORIGINAL_TMP="${ORIGINAL_TMP:-${TMP}}"
|
| 81 |
+
ORIGINAL_TEMP="${ORIGINAL_TEMP:-${TEMP}}"
|
| 82 |
+
#TMP="/tmp"
|
| 83 |
+
#TEMP="/tmp"
|
| 84 |
+
case "$TMP" in *\\*) TMP="$(cygpath -m "$TMP")";; esac
|
| 85 |
+
case "$TEMP" in *\\*) TEMP="$(cygpath -m "$TEMP")";; esac
|
| 86 |
+
test -d "$TMPDIR" || test ! -d "$TMP" || {
|
| 87 |
+
TMPDIR="$TMP"
|
| 88 |
+
export TMPDIR
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
# Shell dependent settings
|
| 93 |
+
profile_d ()
|
| 94 |
+
{
|
| 95 |
+
local file=
|
| 96 |
+
for file in $(export LC_COLLATE=C; echo /etc/profile.d/*.$1); do
|
| 97 |
+
[ -e "${file}" ] && . "${file}"
|
| 98 |
+
done
|
| 99 |
+
|
| 100 |
+
if [ -n "${MINGW_MOUNT_POINT}" ]; then
|
| 101 |
+
for file in $(export LC_COLLATE=C; echo ${MINGW_MOUNT_POINT}/etc/profile.d/*.$1); do
|
| 102 |
+
[ -e "${file}" ] && . "${file}"
|
| 103 |
+
done
|
| 104 |
+
fi
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
for postinst in $(export LC_COLLATE=C; echo /etc/post-install/*.post); do
|
| 108 |
+
[ -e "${postinst}" ] && . "${postinst}"
|
| 109 |
+
done
|
| 110 |
+
|
| 111 |
+
if [ ! "x${BASH_VERSION}" = "x" ]; then
|
| 112 |
+
[ -z "${HOSTNAME}" ] && HOSTNAME="$(exec /usr/bin/hostname)"
|
| 113 |
+
SHELL=`which bash`
|
| 114 |
+
profile_d sh
|
| 115 |
+
[ -f "/etc/bash.bashrc" ] && . "/etc/bash.bashrc"
|
| 116 |
+
elif [ ! "x${KSH_VERSION}" = "x" ]; then
|
| 117 |
+
[ -z "${HOSTNAME}" ] && typeset -l HOSTNAME="$(exec /usr/bin/hostname)"
|
| 118 |
+
profile_d sh
|
| 119 |
+
PS1=$(print '\033]0;${PWD}\n\033[32m${USER}@${HOSTNAME} \033[33m${PWD/${HOME}/~}\033[0m\n$ ')
|
| 120 |
+
elif [ ! "x${ZSH_VERSION}" = "x" ]; then
|
| 121 |
+
[ -z "${HOSTNAME}" ] && HOSTNAME="$(exec /usr/bin/hostname)"
|
| 122 |
+
profile_d sh
|
| 123 |
+
profile_d zsh
|
| 124 |
+
PS1='(%n@%m)[%h] %~ %% '
|
| 125 |
+
SHELL=`which zsh`
|
| 126 |
+
elif [ ! "x${POSH_VERSION}" = "x" ]; then
|
| 127 |
+
[ -z "${HOSTNAME}" ] && HOSTNAME="$(exec /usr/bin/hostname)"
|
| 128 |
+
PS1="$ "
|
| 129 |
+
else
|
| 130 |
+
[ -z "${HOSTNAME}" ] && HOSTNAME="$(exec /usr/bin/hostname)"
|
| 131 |
+
profile_d sh
|
| 132 |
+
PS1="$ "
|
| 133 |
+
fi
|
| 134 |
+
|
| 135 |
+
if [ -n "$ACLOCAL_PATH" ]
|
| 136 |
+
then
|
| 137 |
+
export ACLOCAL_PATH
|
| 138 |
+
fi
|
| 139 |
+
|
| 140 |
+
export PATH MANPATH INFOPATH PKG_CONFIG_PATH PKG_CONFIG_SYSTEM_INCLUDE_PATH PKG_CONFIG_SYSTEM_LIBRARY_PATH USER TMP TEMP HOSTNAME PS1 SHELL ORIGINAL_TMP ORIGINAL_TEMP ORIGINAL_PATH CONFIG_SITE
|
| 141 |
+
unset PATH_SEPARATOR
|
| 142 |
+
|
| 143 |
+
if [ "$MAYBE_FIRST_START" = "true" ]; then
|
| 144 |
+
printf "\e[1;32mInitial setup complete. MSYS2 is now ready to use.\e[1;0m\n" 1>&2;
|
| 145 |
+
fi
|
| 146 |
+
unset MAYBE_FIRST_START
|
git/etc/tigrc
ADDED
|
@@ -0,0 +1,502 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Tig default configuration
|
| 2 |
+
#
|
| 3 |
+
# Please see 'man tigrc' for a complete reference.
|
| 4 |
+
|
| 5 |
+
# Settings
|
| 6 |
+
# --------
|
| 7 |
+
# Most of these settings can be toggleable, either via the toggle-*
|
| 8 |
+
# actions or via the option menu (bound to `o` by default).
|
| 9 |
+
|
| 10 |
+
# View settings
|
| 11 |
+
#
|
| 12 |
+
# Supported column types and their options:
|
| 13 |
+
#
|
| 14 |
+
# author, committer
|
| 15 |
+
# - display (enum) [no|full|abbreviated|email|email-user]
|
| 16 |
+
# : Show author/committer information?
|
| 17 |
+
# - width (int) : Fixed width when nonzero
|
| 18 |
+
# - maxwidth (int) : Autosize limit
|
| 19 |
+
#
|
| 20 |
+
# commit-title
|
| 21 |
+
# - display (bool) : Show the commit title?
|
| 22 |
+
# - graph (enum) [no|v2|v1] : Show the commit graph? (main view only)
|
| 23 |
+
# - refs (bool) : Show branches, tags and remotes? (main view only)
|
| 24 |
+
# - overflow (boolint) : Highlight overflows? Defaults to 50 when enabled.
|
| 25 |
+
#
|
| 26 |
+
# date
|
| 27 |
+
# - display (enum) [no|default|relative|relative-compact|custom]
|
| 28 |
+
# : Show dates?
|
| 29 |
+
# - use-author (bool) : Show author date instead of committer date?
|
| 30 |
+
# - local (bool) : Show local dates?
|
| 31 |
+
# - format (string) : Custom strftime(3) format
|
| 32 |
+
# Note: %Z is formatted as %z
|
| 33 |
+
# - width (int) : Fixed width when nonzero
|
| 34 |
+
#
|
| 35 |
+
# file-name
|
| 36 |
+
# - display (enum) [no|always|auto] : Show file names?
|
| 37 |
+
# - width (int) : Fixed width when nonzero
|
| 38 |
+
# - maxwidth (int) : Autosize limit
|
| 39 |
+
#
|
| 40 |
+
# file-size
|
| 41 |
+
# - display (enum) [no|default|units]
|
| 42 |
+
# : Show file sizes?
|
| 43 |
+
# - width (int) : Fixed width when nonzero
|
| 44 |
+
#
|
| 45 |
+
# id
|
| 46 |
+
# - display (bool) : Show commit/tree ID?
|
| 47 |
+
# - width (int) : Fixed width when nonzero
|
| 48 |
+
#
|
| 49 |
+
# line-number
|
| 50 |
+
# - display (bool) : Show line numbers?
|
| 51 |
+
# - interval (int) : Interval between line numbers; defaults to 5
|
| 52 |
+
# - width (int) : Fixed width when nonzero
|
| 53 |
+
#
|
| 54 |
+
# mode
|
| 55 |
+
# - display (bool) : Show file modes?
|
| 56 |
+
# - width (int) : Fixed width when nonzero
|
| 57 |
+
#
|
| 58 |
+
# ref
|
| 59 |
+
# - display (bool) : Show ref names?
|
| 60 |
+
# - width (int) : Fixed width when nonzero
|
| 61 |
+
# - maxwidth (int) : Autosize limit
|
| 62 |
+
#
|
| 63 |
+
# status
|
| 64 |
+
# - display (enum) [no|short|long] : Show status label?
|
| 65 |
+
#
|
| 66 |
+
# text
|
| 67 |
+
# - display (bool) : Show text?
|
| 68 |
+
# - commit-title-overflow (boolint) : Highlight overflow in log and diff view?
|
| 69 |
+
#
|
| 70 |
+
|
| 71 |
+
set blame-view = id:yes,color file-name:auto author:full committer:no date:default,format="%Y-%m-%d" line-number:yes,interval=1 text
|
| 72 |
+
set grep-view = file-name:no line-number:yes,interval=1 text
|
| 73 |
+
set main-view = line-number:no,interval=5 id:no date:default,format="%Y-%m-%d" author:full committer:no commit-title:yes,graph,refs,overflow=no
|
| 74 |
+
set reflog-view = line-number:no,interval=5 id:yes date:no,format="%Y-%m-%d" author:no committer:no commit-title:yes,refs,overflow=no
|
| 75 |
+
set refs-view = line-number:no id:no date:default,format="%Y-%m-%d" author:full committer:no ref commit-title
|
| 76 |
+
set stash-view = line-number:no,interval=5 id:no date:default,format="%Y-%m-%d" author:full commit-title
|
| 77 |
+
set status-view = line-number:no,interval=5 status:short file-name
|
| 78 |
+
set tree-view = line-number:no,interval=5 mode author:full committer:no file-size date:default,format="%Y-%m-%d" id:no file-name
|
| 79 |
+
|
| 80 |
+
# Pager based views
|
| 81 |
+
set pager-view = line-number:no,interval=5 text
|
| 82 |
+
set stage-view = line-number:no,interval=5 text
|
| 83 |
+
set log-view = line-number:no,interval=5 text
|
| 84 |
+
set blob-view = line-number:no,interval=5 text
|
| 85 |
+
set diff-view = line-number:no,interval=5 text:yes,commit-title-overflow=no
|
| 86 |
+
|
| 87 |
+
# UI display settings
|
| 88 |
+
set show-changes = yes # Show changes commits in the main view?
|
| 89 |
+
set show-untracked = yes # Show also untracked changes?
|
| 90 |
+
set wrap-lines = no # Wrap long lines in pager views?
|
| 91 |
+
set tab-size = 8 # Number of spaces to use when expanding tabs
|
| 92 |
+
set line-graphics = default # Enum: ascii, default, utf-8, auto
|
| 93 |
+
set truncation-delimiter = ~ # Character drawn for truncations, or "utf-8"
|
| 94 |
+
|
| 95 |
+
# Format reference names based on type:
|
| 96 |
+
# - head : The current HEAD.
|
| 97 |
+
# - tag : An annotated tag.
|
| 98 |
+
# - local-tag : A lightweight tag.
|
| 99 |
+
# - remote : A remote.
|
| 100 |
+
# - tracked-remote : The remote tracked by current HEAD.
|
| 101 |
+
# - replace : A replaced reference.
|
| 102 |
+
# - branch : A branch.
|
| 103 |
+
# - stash : The stash.
|
| 104 |
+
# - note : Notes.
|
| 105 |
+
# - prefetch : Refs prefetched by `git maintenance`.
|
| 106 |
+
# - other : Any other reference.
|
| 107 |
+
#
|
| 108 |
+
# Expects a space-separated list of format strings.
|
| 109 |
+
# If no format is specified for `local-tag`, the format for `tag` is used.
|
| 110 |
+
# Similarly, if no format is specified for `tracked-remote`, the format for
|
| 111 |
+
# `remote` is used, and if no format is specified for any other reference
|
| 112 |
+
# type, the format for `branch` is used.
|
| 113 |
+
# Prefix with `hide:` to not show that reference type, e.g. `hide:prefetch`.
|
| 114 |
+
set reference-format = [branch] <tag> {remote} ~replace~
|
| 115 |
+
|
| 116 |
+
# Settings controlling how content is read from Git
|
| 117 |
+
set commit-order = auto # Enum: auto, default, topo, date, reverse (main)
|
| 118 |
+
set status-show-untracked-dirs = yes # Show files in untracked directories? (status)
|
| 119 |
+
set status-show-untracked-files = yes # Show untracked files?
|
| 120 |
+
set ignore-space = no # Enum: no, all, some, at-eol (diff)
|
| 121 |
+
set show-notes = yes # When non-bool passed as `--show-notes=...` (diff)
|
| 122 |
+
#set diff-context = 3 # Number of lines to show around diff changes (diff)
|
| 123 |
+
#set word-diff = yes # Show a word diff? (diff)
|
| 124 |
+
#set diff-options = -C # User-defined options for `tig show` (git-diff)
|
| 125 |
+
#set diff-highlight = yes # String (or bool): Path to diff-highlight script,
|
| 126 |
+
# defaults to `diff-highlight`.
|
| 127 |
+
set diff-indicator = yes # Show diff +/- signs?
|
| 128 |
+
#set blame-options = -C -C -C # User-defined options for `tig blame` (git-blame)
|
| 129 |
+
set log-options = --cc --stat # User-defined options for `tig log` (git-log)
|
| 130 |
+
#set main-options = -n 1000 # User-defined options for `tig` (git-log)
|
| 131 |
+
set mailmap = yes # Use .mailmap to show canonical name and email address?
|
| 132 |
+
|
| 133 |
+
# Misc
|
| 134 |
+
set start-on-head = no # Start with cursor on HEAD commit?
|
| 135 |
+
set refresh-mode = auto # Enum: manual, auto, after-command, periodic
|
| 136 |
+
set refresh-interval = 10 # Interval in seconds between refreshes
|
| 137 |
+
set ignore-case = no # Enum: no, yes, smart-case
|
| 138 |
+
# Ignore case when searching?
|
| 139 |
+
set wrap-search = yes # Wrap around to top/bottom of view when searching?
|
| 140 |
+
set focus-child = yes # Move focus to child view when opened?
|
| 141 |
+
set send-child-enter = yes # Propagate "enter" keypresses to child views?
|
| 142 |
+
set horizontal-scroll = 50% # Number of columns to scroll as % of width
|
| 143 |
+
set split-view-height = 67% # Height of the bottom view for horizontal splits
|
| 144 |
+
set vertical-split = auto # Enum: horizontal, vertical, auto; Use auto to
|
| 145 |
+
# switch to horizontal split when width allows it
|
| 146 |
+
set split-view-width = 50% # Width of right-most view for vertical splits
|
| 147 |
+
set editor-line-number = yes # Automatically pass line number to editor? Used
|
| 148 |
+
# for opening file at specific line e.g. from a diff
|
| 149 |
+
set history-size = 500 # Size of persistent history, 0 to disable
|
| 150 |
+
set mouse = no # Enable mouse support?
|
| 151 |
+
set mouse-scroll = 3 # Number of lines to scroll via the mouse
|
| 152 |
+
set mouse-wheel-cursor = no # Prefer moving the cursor to scrolling the view?
|
| 153 |
+
set pgrp = no # Make tig process-group leader?
|
| 154 |
+
set pager-autoscroll = no # Scroll the pager view automatically while loading?
|
| 155 |
+
|
| 156 |
+
# User-defined commands
|
| 157 |
+
# ---------------------
|
| 158 |
+
# These commands allow to run shell commands directly from within Tig.
|
| 159 |
+
# Unless otherwise specified, commands are run in the foreground with
|
| 160 |
+
# their console output shown (as if '!' was specified). When multiple
|
| 161 |
+
# command options are specified their behavior are combined, e.g. "?<git
|
| 162 |
+
# commit" will prompt the user whether to execute the command and will
|
| 163 |
+
# exit Tig after completion.
|
| 164 |
+
#
|
| 165 |
+
# ! Run the command in the foreground with output shown.
|
| 166 |
+
# @ Run the command in the background with no output.
|
| 167 |
+
# ? Prompt the user before executing the command.
|
| 168 |
+
# + Run the command synchronously, and echo the first line of output to the status bar.
|
| 169 |
+
# < Exit Tig after executing the command.
|
| 170 |
+
# > Re-open Tig instantly in the last displayed view after executing the command.
|
| 171 |
+
#
|
| 172 |
+
# User-defined commands can optionally refer to Tig's internal state
|
| 173 |
+
# using the following variable names, which are substituted before
|
| 174 |
+
# commands are run (see 'man tigrc' for the full list):
|
| 175 |
+
#
|
| 176 |
+
# %(head) The current ref ID. Defaults to HEAD
|
| 177 |
+
# %(commit) The current commit ID.
|
| 178 |
+
# %(blob) The current blob ID.
|
| 179 |
+
# %(branch) The current branch name.
|
| 180 |
+
# %(remote) The current remote name.
|
| 181 |
+
# %(tag) The current tag name.
|
| 182 |
+
# %(stash) The current stash name.
|
| 183 |
+
# %(directory) The current directory path in the tree view;
|
| 184 |
+
# empty for the root directory.
|
| 185 |
+
# %(file) The currently selected file.
|
| 186 |
+
# %(ref) The reference given to blame or HEAD if undefined.
|
| 187 |
+
# %(revargs) The revision arguments passed on the command line.
|
| 188 |
+
# %(fileargs) The file arguments passed on the command line.
|
| 189 |
+
# %(cmdlineargs) All other options passed on the command line.
|
| 190 |
+
# %(diffargs) The diff options from `diff-options` or `TIG_DIFF_OPTS`
|
| 191 |
+
# %(prompt) Prompt for the argument value.
|
| 192 |
+
# %(repo:head) The name of the checked out branch.
|
| 193 |
+
# %(repo:remote) The remote name associated with the checked out branch.
|
| 194 |
+
# %(repo:upstream) The upstream branch associated with the checked out branch.
|
| 195 |
+
|
| 196 |
+
bind main C ?git cherry-pick %(commit)
|
| 197 |
+
bind status C !git commit
|
| 198 |
+
bind stash A ?git stash apply %(stash)
|
| 199 |
+
bind stash P ?git stash pop %(stash)
|
| 200 |
+
bind stash ! ?git stash drop %(stash)
|
| 201 |
+
bind refs C ?git checkout %(branch)
|
| 202 |
+
bind refs ! ?git branch -D %(branch)
|
| 203 |
+
bind reflog C ?git checkout %(branch)
|
| 204 |
+
bind reflog ! ?git reset --hard %(commit)
|
| 205 |
+
|
| 206 |
+
# Normal commands
|
| 207 |
+
# ---------------
|
| 208 |
+
|
| 209 |
+
# View switching
|
| 210 |
+
bind generic m view-main
|
| 211 |
+
bind generic d view-diff
|
| 212 |
+
bind generic l view-log
|
| 213 |
+
bind generic L view-reflog
|
| 214 |
+
bind generic t view-tree
|
| 215 |
+
bind generic f view-blob
|
| 216 |
+
bind generic b view-blame
|
| 217 |
+
bind generic r view-refs
|
| 218 |
+
bind generic p view-pager
|
| 219 |
+
bind generic h view-help
|
| 220 |
+
bind generic s view-status
|
| 221 |
+
bind generic S view-status # Compat binding to avoid going crazy!
|
| 222 |
+
bind generic c view-stage
|
| 223 |
+
bind generic y view-stash
|
| 224 |
+
bind generic g view-grep
|
| 225 |
+
|
| 226 |
+
# View manipulation
|
| 227 |
+
bind generic <Enter> enter # Enter and open selected entry
|
| 228 |
+
bind generic <Lt> back # Go back to the previous view state
|
| 229 |
+
bind generic <Down> next # Move to next
|
| 230 |
+
bind generic <C-N> next
|
| 231 |
+
bind generic J next
|
| 232 |
+
bind generic <Up> previous # Move to previous
|
| 233 |
+
bind generic <C-P> previous
|
| 234 |
+
bind generic K previous
|
| 235 |
+
bind generic , parent # Move to parent
|
| 236 |
+
bind generic <Tab> view-next # Move focus to the next view
|
| 237 |
+
bind generic R refresh # Reload and refresh view
|
| 238 |
+
bind generic <F5> refresh
|
| 239 |
+
bind generic O maximize # Maximize the current view
|
| 240 |
+
bind generic q view-close # Close the current view
|
| 241 |
+
bind generic Q quit # Close all views and quit
|
| 242 |
+
bind generic <C-C> quit # Close all views and quit
|
| 243 |
+
|
| 244 |
+
# View specific
|
| 245 |
+
bind status u status-update # Stage/unstage changes in file
|
| 246 |
+
bind status ! status-revert # Revert changes in file
|
| 247 |
+
bind status M status-merge # Open git-mergetool(1)
|
| 248 |
+
# bind status ??? :toggle status # Show short or long status labels
|
| 249 |
+
bind stage u status-update # Stage/unstage current diff (c)hunk
|
| 250 |
+
bind stage 1 stage-update-line # Stage/unstage current line
|
| 251 |
+
bind stage 2 stage-update-part # Stage/unstage part of chunk
|
| 252 |
+
bind stage ! status-revert # Revert current diff (c)hunk
|
| 253 |
+
bind stage \ stage-split-chunk # Split current diff (c)hunk
|
| 254 |
+
bind stage @ :/^@@ # Jump to next (c)hunk
|
| 255 |
+
bind stage [ :toggle diff-context -1 # Decrease the diff context
|
| 256 |
+
bind stage ] :toggle diff-context +1 # Increase the diff context
|
| 257 |
+
bind diff @ :/^@@ # Jump to next (c)hunk
|
| 258 |
+
bind diff [ :toggle diff-context -1 # Decrease the diff context
|
| 259 |
+
bind diff ] :toggle diff-context +1 # Increase the diff context
|
| 260 |
+
bind pager @ :/^@@ # Jump to next (c)hunk
|
| 261 |
+
bind main H :goto HEAD # Jump to HEAD commit
|
| 262 |
+
bind main G :toggle commit-title-graph # Toggle revision graph visualization
|
| 263 |
+
bind main F :toggle commit-title-refs # Toggle reference display (tags/branches)
|
| 264 |
+
bind reflog F :toggle commit-title-refs # Toggle reference display (tags/branches)
|
| 265 |
+
|
| 266 |
+
# Cursor navigation
|
| 267 |
+
bind generic j move-down
|
| 268 |
+
bind generic k move-up
|
| 269 |
+
bind generic <C-D> move-half-page-down
|
| 270 |
+
bind generic <C-U> move-half-page-up
|
| 271 |
+
bind generic <PgDown> move-page-down
|
| 272 |
+
bind generic <Space> move-page-down
|
| 273 |
+
bind generic <PgUp> move-page-up
|
| 274 |
+
bind generic - move-page-up
|
| 275 |
+
bind generic <Home> move-first-line
|
| 276 |
+
bind generic <End> move-last-line
|
| 277 |
+
|
| 278 |
+
# Scrolling
|
| 279 |
+
bind generic | scroll-first-col
|
| 280 |
+
bind generic <Left> scroll-left
|
| 281 |
+
bind generic <Right> scroll-right
|
| 282 |
+
bind generic <Ins> scroll-line-up
|
| 283 |
+
bind generic <C-Y> scroll-line-up
|
| 284 |
+
bind generic <Del> scroll-line-down
|
| 285 |
+
bind generic <C-E> scroll-line-down
|
| 286 |
+
bind generic <SBack> scroll-page-up
|
| 287 |
+
bind generic <SFwd> scroll-page-down
|
| 288 |
+
# bind generic ??? scroll-half-page-up
|
| 289 |
+
# bind generic ??? scroll-half-page-down
|
| 290 |
+
|
| 291 |
+
# Searching
|
| 292 |
+
bind generic / search
|
| 293 |
+
bind generic ? search-back
|
| 294 |
+
bind generic n find-next
|
| 295 |
+
bind generic N find-prev
|
| 296 |
+
# Navigation keys used while searching
|
| 297 |
+
bind search <Down> find-next
|
| 298 |
+
bind search <C-N> find-next
|
| 299 |
+
bind search <C-J> find-next
|
| 300 |
+
bind search <Up> find-prev
|
| 301 |
+
bind search <C-P> find-prev
|
| 302 |
+
bind search <C-K> find-prev
|
| 303 |
+
bind search <C-C> view-close
|
| 304 |
+
|
| 305 |
+
# Option manipulation
|
| 306 |
+
bind generic o options # Open the options menu
|
| 307 |
+
# Bindings for toggling settings
|
| 308 |
+
bind generic I :toggle sort-order # Toggle ascending/descending sort order
|
| 309 |
+
bind generic i :toggle sort-field # Toggle field to sort by
|
| 310 |
+
bind generic <Hash> :toggle line-number # Toggle line numbers
|
| 311 |
+
bind generic D :toggle date # Toggle date display
|
| 312 |
+
bind generic A :toggle author # Toggle author display
|
| 313 |
+
bind generic T :toggle committer # Toggle committer display
|
| 314 |
+
# bind generic ??? :toggle commit-title-display
|
| 315 |
+
# Toggle commit title display
|
| 316 |
+
bind generic ~ :toggle line-graphics # Toggle (line) graphics mode
|
| 317 |
+
bind generic F :toggle file-name # Toggle file name display
|
| 318 |
+
# bind generic ??? :toggle show-changes # Toggle local changes display in the main view
|
| 319 |
+
bind generic W :toggle ignore-space # Toggle ignoring whitespace in diffs
|
| 320 |
+
# bind generic ??? :toggle ignore-case # Toggle ignoring case when searching
|
| 321 |
+
# bind generic ??? :toggle commit-order # Toggle commit ordering
|
| 322 |
+
bind generic X :toggle id # Toggle commit ID display
|
| 323 |
+
bind generic $ :toggle commit-title-overflow
|
| 324 |
+
# Toggle highlighting of commit title overflow
|
| 325 |
+
# bind generic ??? :toggle file-size # Toggle file size format
|
| 326 |
+
# bind generic ??? :toggle status # Toggle status display
|
| 327 |
+
# bind generic ??? :toggle status-show-untracked-dirs
|
| 328 |
+
# Toggle display of file in untracked directories
|
| 329 |
+
# bind generic ??? :toggle vertical-split # Toggle vertical split
|
| 330 |
+
# bind generic ??? :toggle word-diff # Toggle word diff
|
| 331 |
+
# bind generic ??? :toggle diff-indicator # Toggle display of diff +/- signs
|
| 332 |
+
bind generic % :toggle file-filter # Toggle filtering by pathspecs in file-args
|
| 333 |
+
bind generic ^ :toggle rev-filter # Toggle filtering by revisions in rev-args
|
| 334 |
+
|
| 335 |
+
# Misc
|
| 336 |
+
bind generic e edit # Open in editor
|
| 337 |
+
bind generic : prompt # Open the prompt
|
| 338 |
+
bind generic <C-L> screen-redraw # Redraw the screen
|
| 339 |
+
bind generic z stop-loading # Stop all loading views
|
| 340 |
+
bind generic v show-version # Show Tig version
|
| 341 |
+
|
| 342 |
+
# Colors
|
| 343 |
+
# ------
|
| 344 |
+
|
| 345 |
+
# The colors in the UI can be customized. In addition to the colors used
|
| 346 |
+
# for the UI you can also define new colors to use in the pager, blob,
|
| 347 |
+
# diff, and stage views by placing the text to match for in quotes.
|
| 348 |
+
#
|
| 349 |
+
# Prefix the name of a view to set a color only for that view, e.g.
|
| 350 |
+
#
|
| 351 |
+
# color grep.file blue default
|
| 352 |
+
#
|
| 353 |
+
# As an example, this setting will to color Signed-off-by lines with a
|
| 354 |
+
# yellow foreground color and use the default background color.
|
| 355 |
+
#
|
| 356 |
+
# color " Signed-off-by" yellow default
|
| 357 |
+
#
|
| 358 |
+
# Note the four leading spaces in the string to match. This is because
|
| 359 |
+
# Git automatically indents commit messages by four spaces.
|
| 360 |
+
|
| 361 |
+
color "---" blue default
|
| 362 |
+
color "diff --" yellow default
|
| 363 |
+
color "--- " yellow default
|
| 364 |
+
color "+++ " yellow default
|
| 365 |
+
color "@@" magenta default
|
| 366 |
+
color "+" green default
|
| 367 |
+
color " +" green default
|
| 368 |
+
color "-" red default
|
| 369 |
+
color " -" red default
|
| 370 |
+
color "index " blue default
|
| 371 |
+
color "old mode " yellow default
|
| 372 |
+
color "new mode " yellow default
|
| 373 |
+
color "new file mode " yellow default
|
| 374 |
+
color "deleted file mode " yellow default
|
| 375 |
+
color "copy from " yellow default
|
| 376 |
+
color "copy to " yellow default
|
| 377 |
+
color "rename from " yellow default
|
| 378 |
+
color "rename to " yellow default
|
| 379 |
+
color "similarity " yellow default
|
| 380 |
+
color "dissimilarity " yellow default
|
| 381 |
+
color "" blue default
|
| 382 |
+
color "diff-tree " blue default
|
| 383 |
+
color "Author: " cyan default
|
| 384 |
+
color "Commit: " magenta default
|
| 385 |
+
color "Tagger: " magenta default
|
| 386 |
+
color "Merge: " blue default
|
| 387 |
+
color "Date: " yellow default
|
| 388 |
+
color "AuthorDate: " yellow default
|
| 389 |
+
color "CommitDate: " yellow default
|
| 390 |
+
color "TaggerDate: " yellow default
|
| 391 |
+
color "Refs: " red default
|
| 392 |
+
color "Reflog: " red default
|
| 393 |
+
color "Reflog message: " yellow default
|
| 394 |
+
color "stash@{" magenta default
|
| 395 |
+
color "commit " green default
|
| 396 |
+
color "parent " blue default
|
| 397 |
+
color "tree " blue default
|
| 398 |
+
color "author " green default
|
| 399 |
+
color "committer " magenta default
|
| 400 |
+
color " Signed-off-by:" yellow default
|
| 401 |
+
color " Acked-by:" yellow default
|
| 402 |
+
color " Reviewed-by:" yellow default
|
| 403 |
+
color " Helped-by:" yellow default
|
| 404 |
+
color " Reported-by:" yellow default
|
| 405 |
+
color " Mentored-by:" yellow default
|
| 406 |
+
color " Suggested-by:" yellow default
|
| 407 |
+
color " Cc:" yellow default
|
| 408 |
+
color " Noticed-by:" yellow default
|
| 409 |
+
color " Tested-by:" yellow default
|
| 410 |
+
color " Improved-by:" yellow default
|
| 411 |
+
color " Thanks-to:" yellow default
|
| 412 |
+
color " Based-on-patch-by:" yellow default
|
| 413 |
+
color " Contributions-by:" yellow default
|
| 414 |
+
color " Co-authored-by:" yellow default
|
| 415 |
+
color " Requested-by:" yellow default
|
| 416 |
+
color " Original-patch-by:" yellow default
|
| 417 |
+
color " Inspired-by:" yellow default
|
| 418 |
+
color default default default normal
|
| 419 |
+
color cursor white green bold
|
| 420 |
+
color cursor-blur white green
|
| 421 |
+
color status green default
|
| 422 |
+
color delimiter magenta default
|
| 423 |
+
color date blue default
|
| 424 |
+
color mode cyan default
|
| 425 |
+
color id magenta default
|
| 426 |
+
color overflow red default
|
| 427 |
+
color header yellow default
|
| 428 |
+
color section cyan default
|
| 429 |
+
color directory yellow default
|
| 430 |
+
color file default default
|
| 431 |
+
color grep.file blue default
|
| 432 |
+
color file-size default default
|
| 433 |
+
color line-number cyan default
|
| 434 |
+
color title-blur white blue
|
| 435 |
+
color title-focus white blue bold
|
| 436 |
+
color main-commit default default
|
| 437 |
+
color main-annotated default default bold
|
| 438 |
+
color main-tag magenta default bold
|
| 439 |
+
color main-local-tag magenta default
|
| 440 |
+
color main-remote yellow default
|
| 441 |
+
color main-stash blue default
|
| 442 |
+
color main-note blue default
|
| 443 |
+
color main-prefetch blue default
|
| 444 |
+
color main-other blue default
|
| 445 |
+
color main-replace cyan default
|
| 446 |
+
color main-tracked yellow default bold
|
| 447 |
+
color main-ref cyan default
|
| 448 |
+
color main-head cyan default bold
|
| 449 |
+
color stat-none default default
|
| 450 |
+
color stat-staged magenta default
|
| 451 |
+
color stat-unstaged magenta default
|
| 452 |
+
color stat-untracked magenta default
|
| 453 |
+
color help-group blue default
|
| 454 |
+
color help-action yellow default
|
| 455 |
+
color diff-stat blue default
|
| 456 |
+
color diff-add-highlight green default standout
|
| 457 |
+
color diff-del-highlight red default standout
|
| 458 |
+
color palette-0 magenta default
|
| 459 |
+
color palette-1 yellow default
|
| 460 |
+
color palette-2 cyan default
|
| 461 |
+
color palette-3 green default
|
| 462 |
+
color palette-4 default default
|
| 463 |
+
color palette-5 white default
|
| 464 |
+
color palette-6 red default
|
| 465 |
+
color palette-7 magenta default bold
|
| 466 |
+
color palette-8 yellow default bold
|
| 467 |
+
color palette-9 cyan default bold
|
| 468 |
+
color palette-10 green default bold
|
| 469 |
+
color palette-11 default default bold
|
| 470 |
+
color palette-12 white default bold
|
| 471 |
+
color palette-13 red default bold
|
| 472 |
+
color graph-commit blue default
|
| 473 |
+
color search-result black yellow
|
| 474 |
+
|
| 475 |
+
# Mappings for colors read from git configuration.
|
| 476 |
+
# Set to "no" to disable.
|
| 477 |
+
set git-colors = \
|
| 478 |
+
branch.current=main-head \
|
| 479 |
+
branch.local=main-ref \
|
| 480 |
+
branch.plain=main-ref \
|
| 481 |
+
branch.remote=main-remote \
|
| 482 |
+
\
|
| 483 |
+
diff.meta=diff-header \
|
| 484 |
+
diff.meta=diff-index \
|
| 485 |
+
diff.meta=diff-oldmode \
|
| 486 |
+
diff.meta=diff-newmode \
|
| 487 |
+
diff.frag=diff-chunk \
|
| 488 |
+
diff.old=diff-del \
|
| 489 |
+
diff.new=diff-add \
|
| 490 |
+
\
|
| 491 |
+
diff-highlight.oldHighlight=diff-del-highlight \
|
| 492 |
+
diff-highlight.newHighlight=diff-add-highlight \
|
| 493 |
+
\
|
| 494 |
+
grep.filename=grep.file \
|
| 495 |
+
grep.linenumber=grep.line-number \
|
| 496 |
+
grep.separator=grep.delimiter \
|
| 497 |
+
\
|
| 498 |
+
status.branch=status.header \
|
| 499 |
+
status.added=stat-staged \
|
| 500 |
+
status.updated=stat-staged \
|
| 501 |
+
status.changed=stat-unstaged \
|
| 502 |
+
status.untracked=stat-untracked
|
git/etc/vimrc
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
" Setting some decent VIM settings for programming
|
| 2 |
+
" This source file comes from git-for-windows build-extra repository (git-extra/vimrc)
|
| 3 |
+
|
| 4 |
+
ru! defaults.vim " Use Enhanced Vim defaults
|
| 5 |
+
set mouse= " Reset the mouse setting from defaults
|
| 6 |
+
aug vimStartup | au! | aug END " Revert last positioned jump, as it is defined below
|
| 7 |
+
let g:skip_defaults_vim = 1 " Do not source defaults.vim again (after loading this system vimrc)
|
| 8 |
+
|
| 9 |
+
set ai " set auto-indenting on for programming
|
| 10 |
+
set showmatch " automatically show matching brackets. works like it does in bbedit.
|
| 11 |
+
set vb " turn on the "visual bell" - which is much quieter than the "audio blink"
|
| 12 |
+
set laststatus=2 " make the last line where the status is two lines deep so you can see status always
|
| 13 |
+
set showmode " show the current mode
|
| 14 |
+
set clipboard=unnamed " set clipboard to unnamed to access the system clipboard under windows
|
| 15 |
+
set wildmode=list:longest,longest:full " Better command line completion
|
| 16 |
+
|
| 17 |
+
" Show EOL type and last modified timestamp, right after the filename
|
| 18 |
+
" Set the statusline
|
| 19 |
+
set statusline=%f " filename relative to current $PWD
|
| 20 |
+
set statusline+=%h " help file flag
|
| 21 |
+
set statusline+=%m " modified flag
|
| 22 |
+
set statusline+=%r " readonly flag
|
| 23 |
+
set statusline+=\ [%{&ff}] " Fileformat [unix]/[dos] etc...
|
| 24 |
+
set statusline+=\ (%{strftime(\"%H:%M\ %d/%m/%Y\",getftime(expand(\"%:p\")))}) " last modified timestamp
|
| 25 |
+
set statusline+=%= " Rest: right align
|
| 26 |
+
set statusline+=%l,%c%V " Position in buffer: linenumber, column, virtual column
|
| 27 |
+
set statusline+=\ %P " Position in buffer: Percentage
|
| 28 |
+
|
| 29 |
+
if &term =~ 'xterm-256color' " mintty identifies itself as xterm-compatible
|
| 30 |
+
if &t_Co == 8
|
| 31 |
+
set t_Co = 256 " Use at least 256 colors
|
| 32 |
+
endif
|
| 33 |
+
" set termguicolors " Uncomment to allow truecolors on mintty
|
| 34 |
+
endif
|
| 35 |
+
"------------------------------------------------------------------------------
|
| 36 |
+
" Only do this part when compiled with support for autocommands.
|
| 37 |
+
if has("autocmd")
|
| 38 |
+
" Set UTF-8 as the default encoding for commit messages
|
| 39 |
+
autocmd BufReadPre COMMIT_EDITMSG,MERGE_MSG,git-rebase-todo setlocal fileencoding=utf-8
|
| 40 |
+
|
| 41 |
+
" Remember the positions in files with some git-specific exceptions"
|
| 42 |
+
autocmd BufReadPost *
|
| 43 |
+
\ if line("'\"") > 0 && line("'\"") <= line("$")
|
| 44 |
+
\ && &filetype !~# 'commit\|gitrebase'
|
| 45 |
+
\ && expand("%") !~ "ADD_EDIT.patch"
|
| 46 |
+
\ && expand("%") !~ "addp-hunk-edit.diff" |
|
| 47 |
+
\ exe "normal! g`\"" |
|
| 48 |
+
\ endif
|
| 49 |
+
|
| 50 |
+
autocmd BufNewFile,BufRead *.patch set filetype=diff
|
| 51 |
+
|
| 52 |
+
autocmd Filetype diff
|
| 53 |
+
\ highlight WhiteSpaceEOL ctermbg=red |
|
| 54 |
+
\ match WhiteSpaceEOL /\(^+.*\)\@<=\s\+$/
|
| 55 |
+
endif " has("autocmd")
|
git/usr/bin/addgnupghome
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/sh
|
| 2 |
+
# Add a new .gnupg home directory for a list of users -*- sh -*-
|
| 3 |
+
#
|
| 4 |
+
# Copyright 2004 Free Software Foundation, Inc.
|
| 5 |
+
#
|
| 6 |
+
# This file is free software; as a special exception the author gives
|
| 7 |
+
# unlimited permission to copy and/or distribute it, with or without
|
| 8 |
+
# modifications, as long as this notice is preserved.
|
| 9 |
+
#
|
| 10 |
+
# This file is distributed in the hope that it will be useful, but
|
| 11 |
+
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
| 12 |
+
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
| 13 |
+
|
| 14 |
+
PGM=addgnupghome
|
| 15 |
+
any_error=0
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
error () {
|
| 19 |
+
echo "$PGM: $*" >&2
|
| 20 |
+
any_error=1
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
info () {
|
| 24 |
+
echo "$PGM: $*" >&2
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
# Do it for one user
|
| 28 |
+
one_user () {
|
| 29 |
+
user="$1"
|
| 30 |
+
home=$(${cat_passwd} | awk -F: -v n="$user" '$1 == n {print $6}')
|
| 31 |
+
if [ -z "$home" ]; then
|
| 32 |
+
if ${cat_passwd} | awk -F: -v n="$user" '$1 == n {exit 1}'; then
|
| 33 |
+
error "no such user \`$user'"
|
| 34 |
+
else
|
| 35 |
+
error "no home directory for user \`$user'"
|
| 36 |
+
fi
|
| 37 |
+
return
|
| 38 |
+
fi
|
| 39 |
+
if [ ! -d "$home" ]; then
|
| 40 |
+
error "home directory \`$home' of user \`$user' does not exist"
|
| 41 |
+
return
|
| 42 |
+
fi
|
| 43 |
+
if [ -d "$home/.gnupg" ]; then
|
| 44 |
+
info "skipping user \`$user': \`.gnupg' already exists"
|
| 45 |
+
return
|
| 46 |
+
fi
|
| 47 |
+
info "creating home directory \`$home/.gnupg' for \`$user'"
|
| 48 |
+
if ! mkdir "$home/.gnupg" ; then
|
| 49 |
+
error "error creating \`$home/.gnupg'"
|
| 50 |
+
return
|
| 51 |
+
fi
|
| 52 |
+
|
| 53 |
+
if ! chown $user "$home/.gnupg" ; then
|
| 54 |
+
error "error changing ownership of \`$home/.gnupg'"
|
| 55 |
+
return
|
| 56 |
+
fi
|
| 57 |
+
|
| 58 |
+
group=$(id -g "$user")
|
| 59 |
+
[ -z "$group" ] && group="0"
|
| 60 |
+
|
| 61 |
+
if [ "$group" -gt 0 ]; then
|
| 62 |
+
if ! chgrp $group "$home/.gnupg" ; then
|
| 63 |
+
error "error changing group of \`$home/.gnupg'"
|
| 64 |
+
return
|
| 65 |
+
fi
|
| 66 |
+
fi
|
| 67 |
+
|
| 68 |
+
if ! cd "$home/.gnupg" ; then
|
| 69 |
+
error "error cd-ing to \`$home/.gnupg'"
|
| 70 |
+
return
|
| 71 |
+
fi
|
| 72 |
+
for f in $filelist; do
|
| 73 |
+
if [ -d /etc/skel/.gnupg/$f ]; then
|
| 74 |
+
mkdir $f
|
| 75 |
+
else
|
| 76 |
+
cp /etc/skel/.gnupg/$f $f
|
| 77 |
+
fi
|
| 78 |
+
if ! chown $user $f ; then
|
| 79 |
+
error "error changing ownership of \`$f'"
|
| 80 |
+
return
|
| 81 |
+
fi
|
| 82 |
+
if [ "$group" -gt 0 ]; then
|
| 83 |
+
if ! chgrp $group "$f" ; then
|
| 84 |
+
error "error changing group of \`$f'"
|
| 85 |
+
return
|
| 86 |
+
fi
|
| 87 |
+
fi
|
| 88 |
+
done
|
| 89 |
+
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
if [ -z "$1" ]; then
|
| 93 |
+
echo "usage: $PGM userids"
|
| 94 |
+
exit 1
|
| 95 |
+
fi
|
| 96 |
+
|
| 97 |
+
# Check whether we can use getent
|
| 98 |
+
if getent --help </dev/null >/dev/null 2>&1 ; then
|
| 99 |
+
cat_passwd='getent passwd'
|
| 100 |
+
else
|
| 101 |
+
cat_passwd='cat /etc/passwd'
|
| 102 |
+
info "please note that only users from /etc/passwd are checked"
|
| 103 |
+
fi
|
| 104 |
+
|
| 105 |
+
if [ ! -d /etc/skel/.gnupg ]; then
|
| 106 |
+
error "skeleton directory \`/etc/skel/.gnupg' does not exist"
|
| 107 |
+
exit 1
|
| 108 |
+
fi
|
| 109 |
+
cd "/etc/skel/.gnupg" || (error "error cd-ing to \`/etc/skel/.gnupg'"; exit 1)
|
| 110 |
+
filelist=$(find . \( -type f -o -type d \) '!' -name '*~' '!' -name . -print)
|
| 111 |
+
|
| 112 |
+
|
| 113 |
+
if ! umask 0077 ; then
|
| 114 |
+
error "error setting umask"
|
| 115 |
+
exit 1
|
| 116 |
+
fi
|
| 117 |
+
|
| 118 |
+
for name in $*; do
|
| 119 |
+
one_user $name
|
| 120 |
+
done
|
| 121 |
+
|
| 122 |
+
exit $any_error
|
git/usr/bin/applygnupgdefaults
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/sh
|
| 2 |
+
# Apply defaults from /etc/gnupg/gpgconf.conf to all users -*- sh -*-
|
| 3 |
+
#
|
| 4 |
+
# Copyright 2007 Free Software Foundation, Inc.
|
| 5 |
+
#
|
| 6 |
+
# This file is free software; as a special exception the author gives
|
| 7 |
+
# unlimited permission to copy and/or distribute it, with or without
|
| 8 |
+
# modifications, as long as this notice is preserved.
|
| 9 |
+
#
|
| 10 |
+
# This file is distributed in the hope that it will be useful, but
|
| 11 |
+
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
| 12 |
+
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
| 13 |
+
|
| 14 |
+
PGM=applygnupgdefaults
|
| 15 |
+
errorfile=
|
| 16 |
+
|
| 17 |
+
error () {
|
| 18 |
+
echo "$PGM: $*" >&2
|
| 19 |
+
[ -n "$errorfile" ] && echo "$PGM: $*" >>$errorfile
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
info () {
|
| 23 |
+
echo "$PGM: $*" >&2
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
if [ -n "$1" ]; then
|
| 27 |
+
echo "usage: $PGM" >&2
|
| 28 |
+
exit 1
|
| 29 |
+
fi
|
| 30 |
+
|
| 31 |
+
# Cleanup on exit
|
| 32 |
+
cleanup ()
|
| 33 |
+
{
|
| 34 |
+
[ -n "$errorfile" -a -f "$errorfile" ] && rm "$errorfile"
|
| 35 |
+
}
|
| 36 |
+
trap cleanup EXIT SIGINT SIGHUP SIGPIPE
|
| 37 |
+
errorfile=$(mktemp "/tmp/$PGM.log.XXXXXX")
|
| 38 |
+
[ -n "$errorfile" -a -f "$errorfile" ] || exit 2
|
| 39 |
+
|
| 40 |
+
# Check whether we can use getent
|
| 41 |
+
if getent --help </dev/null >/dev/null 2>&1 ; then
|
| 42 |
+
cat_passwd='getent passwd'
|
| 43 |
+
else
|
| 44 |
+
cat_passwd='cat /etc/passwd'
|
| 45 |
+
info "please note that only users from /etc/passwd are processed"
|
| 46 |
+
fi
|
| 47 |
+
|
| 48 |
+
if [ ! -f /etc/gnupg/gpgconf.conf ]; then
|
| 49 |
+
error "global configuration file \`/etc/gnupg/gpgconf.conf' does not exist"
|
| 50 |
+
exit 1
|
| 51 |
+
fi
|
| 52 |
+
if [ ! -f /etc/shells ]; then
|
| 53 |
+
error "missing file \`/etc/shells'"
|
| 54 |
+
exit 1
|
| 55 |
+
fi
|
| 56 |
+
|
| 57 |
+
if [ $(id -u) -ne 0 ]; then
|
| 58 |
+
error "needs to be run as root"
|
| 59 |
+
exit 1
|
| 60 |
+
fi
|
| 61 |
+
|
| 62 |
+
${cat_passwd} \
|
| 63 |
+
| while IFS=: read -r user dmy_a uid dmy_c dmy_d home shell dmy_rest; do
|
| 64 |
+
# Process only entries with a valid login shell
|
| 65 |
+
grep </etc/shells "^$shell" 2>/dev/null >/dev/null || continue
|
| 66 |
+
# and with an pre-existing gnupg home directory
|
| 67 |
+
[ -d "$home/.gnupg" ] || continue
|
| 68 |
+
# but not root
|
| 69 |
+
[ "${uid:-0}" -eq 0 ] && continue
|
| 70 |
+
info "running \"gpgconf --apply-defaults\" for $user"
|
| 71 |
+
if su -l -s /bin/sh \
|
| 72 |
+
-c 'gpgconf --apply-defaults && echo SUCCESS' $user \
|
| 73 |
+
| tail -1 | grep ^SUCCESS >/dev/null ; then
|
| 74 |
+
:
|
| 75 |
+
else
|
| 76 |
+
error "failed to update gnupg defaults for $user"
|
| 77 |
+
fi
|
| 78 |
+
done
|
| 79 |
+
|
| 80 |
+
[ "$(wc -c <$errorfile)" -gt 0 ] && exit 1
|
| 81 |
+
exit 0
|
git/usr/bin/arch.exe
ADDED
|
Binary file (35.9 kB). View file
|
|
|
git/usr/bin/astextplain
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/sh -e
|
| 2 |
+
# minimalistic replacement for `run-mailcap --action=cat <file>`
|
| 3 |
+
|
| 4 |
+
if test "$#" != 1 ; then
|
| 5 |
+
echo "Usage: astextplain <file>" 1>&2
|
| 6 |
+
exit 1
|
| 7 |
+
fi
|
| 8 |
+
|
| 9 |
+
# XXX output encoding (UTF-8) hardcoded
|
| 10 |
+
case "$(file --brief --mime-type "$1")" in
|
| 11 |
+
application/vnd.oasis.opendocument.spreadsheet | application/vnd.oasis.opendocument.formula | application/vnd.oasis.opendocument.text)
|
| 12 |
+
odt2txt "$1" || cat "$1"
|
| 13 |
+
;;
|
| 14 |
+
application/msword)
|
| 15 |
+
out=$(antiword -m UTF-8 "$1") && sed "s/\^M$//" <<<$out || cat "$1"
|
| 16 |
+
;;
|
| 17 |
+
application/vnd.openxmlformats-officedocument.wordprocessingml.* | application/vnd.ms-word.*.macroenabled.12)
|
| 18 |
+
docx2txt.pl "$1" - || cat "$1"
|
| 19 |
+
;;
|
| 20 |
+
application/pdf)
|
| 21 |
+
out=$(pdftotext -q -layout -enc UTF-8 "$1" -) && sed "s/(\^M$)|(^\^L)//" <<<$out || cat "$1"
|
| 22 |
+
;;
|
| 23 |
+
# TODO add rtf support
|
| 24 |
+
application/rtf | text/rtf | text/plain | inode/x-empty)
|
| 25 |
+
cat "$1"
|
| 26 |
+
;;
|
| 27 |
+
*)
|
| 28 |
+
echo "E: unsupported filetype $1" 1>&2
|
| 29 |
+
exit 1
|
| 30 |
+
;;
|
| 31 |
+
esac
|
| 32 |
+
|
| 33 |
+
exit 0
|
git/usr/bin/b2sum.exe
ADDED
|
Binary file (55.4 kB). View file
|
|
|
git/usr/bin/backup
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#! /bin/sh
|
| 2 |
+
# Make backups.
|
| 3 |
+
|
| 4 |
+
# Copyright 2004-2006, 2013, 2019 Free Software Foundation
|
| 5 |
+
|
| 6 |
+
# This file is part of GNU tar.
|
| 7 |
+
|
| 8 |
+
# GNU tar is free software; you can redistribute it and/or modify
|
| 9 |
+
# it under the terms of the GNU General Public License as published by
|
| 10 |
+
# the Free Software Foundation; either version 3 of the License, or
|
| 11 |
+
# (at your option) any later version.
|
| 12 |
+
|
| 13 |
+
# GNU tar is distributed in the hope that it will be useful,
|
| 14 |
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
+
# GNU General Public License for more details.
|
| 17 |
+
|
| 18 |
+
# You should have received a copy of the GNU General Public License
|
| 19 |
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 20 |
+
|
| 21 |
+
# Load library routines
|
| 22 |
+
SYSCONFDIR=${SYSCONFDIR-/usr/etc}
|
| 23 |
+
. ${LIBDIR-/usr/lib/tar}/backup.sh
|
| 24 |
+
|
| 25 |
+
DUMP_LEVEL=0
|
| 26 |
+
TIME=
|
| 27 |
+
NOW=`now`
|
| 28 |
+
|
| 29 |
+
usage() {
|
| 30 |
+
cat - <<EOF
|
| 31 |
+
usage: $PROGNAME [OPTIONS] [WHEN]
|
| 32 |
+
Options are:
|
| 33 |
+
|
| 34 |
+
-l, --level=LEVEL Do backup level LEVEL (default $DUMP_LEVEL).
|
| 35 |
+
-f, --force Force backup even if today's log file already
|
| 36 |
+
exists.
|
| 37 |
+
-v, --verbose[=LEVEL] Set verbosity level. Default 100.
|
| 38 |
+
-t, --time=TIME Wait till TIME, then do backup.
|
| 39 |
+
|
| 40 |
+
Informational options:
|
| 41 |
+
-h, --help Display this help message.
|
| 42 |
+
-V, --version Display program version.
|
| 43 |
+
|
| 44 |
+
Optional argument WHEN is for backward compatibility only. It has been
|
| 45 |
+
superseded by --time option.
|
| 46 |
+
TIME argument can be one of:
|
| 47 |
+
|
| 48 |
+
now -- do backup immediately.
|
| 49 |
+
HH -- do backup at HH hours.
|
| 50 |
+
HH:MM -- do backup at HH:MM.
|
| 51 |
+
|
| 52 |
+
Send bug reports to bug-tar@gnu.org.
|
| 53 |
+
EOF
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
# For compatibility with previous versions, deduce the backup level
|
| 57 |
+
# from the command name
|
| 58 |
+
case "$PROGNAME" in
|
| 59 |
+
level-[0-9]) DUMP_LEVEL=`expr $PROGNAME : 'level-\([0-9][0-9]*\)'`;;
|
| 60 |
+
esac
|
| 61 |
+
|
| 62 |
+
for opt
|
| 63 |
+
do
|
| 64 |
+
if [ -z "$prev" ]; then
|
| 65 |
+
option=$opt
|
| 66 |
+
optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'`
|
| 67 |
+
else
|
| 68 |
+
option="${prev}=$opt"
|
| 69 |
+
prev=""
|
| 70 |
+
optarg=$opt
|
| 71 |
+
fi
|
| 72 |
+
case $option in
|
| 73 |
+
--l=*|--le=*|--lev=*|--leve=*|--level=*)
|
| 74 |
+
DUMP_LEVEL=$optarg
|
| 75 |
+
;;
|
| 76 |
+
-l?*) DUMP_LEVEL=`expr $option : '-l\(.*\)'`;;
|
| 77 |
+
-l|--l|--le|--lev|--leve|--level)
|
| 78 |
+
prev=--level
|
| 79 |
+
;;
|
| 80 |
+
--verb=*|--verbo=*|--verbos=*|--verbose=*)
|
| 81 |
+
VERBOSE=$optarg
|
| 82 |
+
;;
|
| 83 |
+
-v|--verb|--verbo|--verbos|--verbose)
|
| 84 |
+
VERBOSE=100
|
| 85 |
+
;;
|
| 86 |
+
-v*) VERBOSE=`expr $option : '-v\(.*\)'`;;
|
| 87 |
+
--t=*|--ti=*|--tim=*|--time=*)
|
| 88 |
+
TIME=$optarg
|
| 89 |
+
;;
|
| 90 |
+
-t?*) TIME=`expr $option : '-t\(.*\)'`;;
|
| 91 |
+
-t|--t|--ti|--tim|--time)
|
| 92 |
+
prev=--time
|
| 93 |
+
;;
|
| 94 |
+
-V|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
| 95 |
+
echo "backup (GNU tar) 1.35"
|
| 96 |
+
license
|
| 97 |
+
exit;;
|
| 98 |
+
-h|--h|--he|--hel|--help)
|
| 99 |
+
usage
|
| 100 |
+
exit;;
|
| 101 |
+
-f|--f|--fo|--for|--forc|--force)
|
| 102 |
+
FORCE=yes
|
| 103 |
+
;;
|
| 104 |
+
*) if [ "x$TIME" != "x" ]; then
|
| 105 |
+
bailout "Extra argument. Try $PROGNAME --help for more info."
|
| 106 |
+
else
|
| 107 |
+
TIME=$option
|
| 108 |
+
fi;;
|
| 109 |
+
esac
|
| 110 |
+
done
|
| 111 |
+
|
| 112 |
+
if [ "x$TIME" = x ]; then
|
| 113 |
+
bailout "No backup time specified. Try $PROGNAME --help for more info."
|
| 114 |
+
exit 1
|
| 115 |
+
fi
|
| 116 |
+
|
| 117 |
+
init_backup
|
| 118 |
+
|
| 119 |
+
# Maybe sleep until around specified or default hour.
|
| 120 |
+
wait_time $TIME
|
| 121 |
+
|
| 122 |
+
if [ $DUMP_LEVEL -ne 0 ]; then
|
| 123 |
+
PREV_LEVEL=`expr $DUMP_LEVEL - 1`
|
| 124 |
+
PREV_DATE=`ls -t ${LOGPATH}/log-*-level-$PREV_LEVEL|
|
| 125 |
+
head -n 1|
|
| 126 |
+
sed "s,${LOGPATH}/log-\(.*\)-level.*,\1,"`
|
| 127 |
+
if [ "x$PREV_DATE" = x ]; then
|
| 128 |
+
bailout "Can't determine date of the previous backup"
|
| 129 |
+
fi
|
| 130 |
+
message 0 "Backup from $PREV_DATE to $NOW"
|
| 131 |
+
fi
|
| 132 |
+
|
| 133 |
+
# start doing things
|
| 134 |
+
|
| 135 |
+
# Make sure the log file did not already exist. Create it.
|
| 136 |
+
|
| 137 |
+
if [ "x$FORCE" = "xyes" ]; then
|
| 138 |
+
rm ${LOGFILE}
|
| 139 |
+
fi
|
| 140 |
+
|
| 141 |
+
if [ -f "${LOGFILE}" ] ; then
|
| 142 |
+
bailout "Log file ${LOGFILE} already exists."
|
| 143 |
+
else
|
| 144 |
+
touch "${LOGFILE}"
|
| 145 |
+
fi
|
| 146 |
+
message 1 "Ready for backup."
|
| 147 |
+
message 10 "TAR invocation: $TAR_PART1"
|
| 148 |
+
message 20 "Variables:"
|
| 149 |
+
message 20 "BACKUP_DIRS=$BACKUP_DIRS"
|
| 150 |
+
message 20 "BACKUP_FILES=$BACKUP_FILES"
|
| 151 |
+
|
| 152 |
+
# The bunch of commands below is run in a subshell for which all output is
|
| 153 |
+
# piped through 'tee' to the logfile. Doing this, instead of having
|
| 154 |
+
# multiple pipelines all over the place, is cleaner and allows access to
|
| 155 |
+
# the exit value from various commands more easily.
|
| 156 |
+
(
|
| 157 |
+
message 1 "preparing tapes"
|
| 158 |
+
if ! $MT_BEGIN "${TAPE_FILE}"; then
|
| 159 |
+
echo >&2 "$0: tape initialization failed"
|
| 160 |
+
exit 1
|
| 161 |
+
fi
|
| 162 |
+
rm -f "${VOLNO_FILE}"
|
| 163 |
+
|
| 164 |
+
message 1 "processing backup directories"
|
| 165 |
+
|
| 166 |
+
set - ${BACKUP_DIRS}
|
| 167 |
+
while [ $# -ne 0 ] ; do
|
| 168 |
+
date="`date`"
|
| 169 |
+
fs="`echo \"${1}\" | sed -e 's/^.*://'`"
|
| 170 |
+
fs=`root_fs $fs`
|
| 171 |
+
fsname="`echo \"${1}\" | sed -e 's/\//:/g'`"
|
| 172 |
+
remotehost="`expr \"${1}\" : '\([^/][^/]*\):.*'`"
|
| 173 |
+
if [ -z "$remotehost" ]; then
|
| 174 |
+
remotehost=$localhost
|
| 175 |
+
fi
|
| 176 |
+
|
| 177 |
+
echo "Backing up ${1} at ${date}"
|
| 178 |
+
message 10 "fs=$fs"
|
| 179 |
+
message 10 "fsname=$fsname"
|
| 180 |
+
message 10 "remotehost=$remotehost"
|
| 181 |
+
if [ $DUMP_LEVEL -eq 0 ]; then
|
| 182 |
+
make_level_log ${remotehost}
|
| 183 |
+
else
|
| 184 |
+
echo "Last `prev_level` dump on this filesystem was on $PREV_DATE"
|
| 185 |
+
remote_run "${remotehost}" cp "`level_log_name ${fsname} $PREV_LEVEL`" "`level_log_name temp`"
|
| 186 |
+
fi
|
| 187 |
+
|
| 188 |
+
${DUMP_BEGIN-:} $DUMP_LEVEL $remotehost $fs $fsname
|
| 189 |
+
backup_host ${remotehost} \
|
| 190 |
+
"--listed=`level_log_name temp`" \
|
| 191 |
+
"--label='`print_level` backup of ${fs} on ${remotehost} at ${NOW}'" \
|
| 192 |
+
-C ${fs} .
|
| 193 |
+
|
| 194 |
+
# 'rsh' doesn't exit with the exit status of the remote command. What
|
| 195 |
+
# stupid lossage. TODO: think of a reliable workaround.
|
| 196 |
+
if [ $? -ne 0 ] ; then
|
| 197 |
+
echo "$0: backup of ${1} failed." 1>&2
|
| 198 |
+
# I'm assuming that the tar will have written an empty
|
| 199 |
+
# file to the tape, otherwise I should do a cat here.
|
| 200 |
+
else
|
| 201 |
+
flush_level_log ${remotehost} ${fsname}
|
| 202 |
+
fi
|
| 203 |
+
${MT_STATUS} "$TAPE_FILE"
|
| 204 |
+
${DUMP_END-:} $DUMP_LEVEL $remotehost $fs $fsname
|
| 205 |
+
echo "sleeping ${SLEEP_TIME} seconds"
|
| 206 |
+
sleep ${SLEEP_TIME}
|
| 207 |
+
shift
|
| 208 |
+
done
|
| 209 |
+
|
| 210 |
+
# Dump any individual files requested.
|
| 211 |
+
|
| 212 |
+
if [ "x${BACKUP_FILES}" != "x" ] ; then
|
| 213 |
+
message 1 "processing individual files"
|
| 214 |
+
|
| 215 |
+
date="`date`"
|
| 216 |
+
|
| 217 |
+
if [ $DUMP_LEVEL -eq 0 ]; then
|
| 218 |
+
make_level_log $localhost
|
| 219 |
+
else
|
| 220 |
+
echo "Last `prev_level` dump on this filesystem was on $PREV_DATE"
|
| 221 |
+
remote_run "${localhost}" cp "`level_log_name MISC $PREV_LEVEL`" "`level_log_name temp`"
|
| 222 |
+
fi
|
| 223 |
+
|
| 224 |
+
echo "Backing up miscellaneous files at ${date}"
|
| 225 |
+
|
| 226 |
+
${DUMP_BEGIN-:} $DUMP_LEVEL $localhost MISC MISC
|
| 227 |
+
backup_host $localhost \
|
| 228 |
+
"--listed=`level_log_name temp`"\
|
| 229 |
+
"--label='`print_level` backup of miscellaneous files at ${NOW}'" \
|
| 230 |
+
${BACKUP_FILES}
|
| 231 |
+
|
| 232 |
+
if [ $? -ne 0 ] ; then
|
| 233 |
+
echo "Backup of miscellaneous files failed."
|
| 234 |
+
# I'm assuming that the tar will have written an empty
|
| 235 |
+
# file to the tape, otherwise I should do a cat here.
|
| 236 |
+
else
|
| 237 |
+
flush_level_log $localhost MISC
|
| 238 |
+
fi
|
| 239 |
+
${MT_STATUS} "$TAPE_FILE"
|
| 240 |
+
${DUMP_END-:} $DUMP_LEVEL $localhost MISC MISC
|
| 241 |
+
else
|
| 242 |
+
echo "No miscellaneous files specified"
|
| 243 |
+
fi
|
| 244 |
+
message 1 "final cleanup"
|
| 245 |
+
|
| 246 |
+
$MT_REWIND "${TAPE_FILE}"
|
| 247 |
+
$MT_OFFLINE "${TAPE_FILE}"
|
| 248 |
+
echo "."
|
| 249 |
+
) 2>&1 | tee -a "${LOGFILE}"
|
| 250 |
+
RC=$?
|
| 251 |
+
|
| 252 |
+
if test "${ADMINISTRATOR}" != NONE; then
|
| 253 |
+
echo "Sending the dump log to ${ADMINISTRATOR}"
|
| 254 |
+
mail -s "Results of backup started ${startdate}" ${ADMINISTRATOR} < "${LOGFILE}"
|
| 255 |
+
fi
|
| 256 |
+
exit $RC
|
| 257 |
+
# EOF
|
git/usr/bin/base32.exe
ADDED
|
Binary file (41.8 kB). View file
|
|
|
git/usr/bin/base64.exe
ADDED
|
Binary file (41.8 kB). View file
|
|
|
git/usr/bin/basename.exe
ADDED
|
Binary file (34.9 kB). View file
|
|
|
git/usr/bin/basenc.exe
ADDED
|
Binary file (49.5 kB). View file
|
|
|
git/usr/bin/bashbug
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/sh -
|
| 2 |
+
#
|
| 3 |
+
# bashbug - create a bug report and mail it to the bug address
|
| 4 |
+
#
|
| 5 |
+
# The bug address depends on the release status of the shell. Versions
|
| 6 |
+
# with status `devel', `alpha', `beta', or `rc' mail bug reports to
|
| 7 |
+
# chet.ramey@case.edu and, optionally, to bash-testers@cwru.edu.
|
| 8 |
+
# Other versions send mail to bug-bash@gnu.org.
|
| 9 |
+
#
|
| 10 |
+
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
| 11 |
+
#
|
| 12 |
+
# This program is free software: you can redistribute it and/or modify
|
| 13 |
+
# it under the terms of the GNU General Public License as published by
|
| 14 |
+
# the Free Software Foundation, either version 3 of the License, or
|
| 15 |
+
# (at your option) any later version.
|
| 16 |
+
#
|
| 17 |
+
# This program is distributed in the hope that it will be useful,
|
| 18 |
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 19 |
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 20 |
+
# GNU General Public License for more details.
|
| 21 |
+
#
|
| 22 |
+
# You should have received a copy of the GNU General Public License
|
| 23 |
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 24 |
+
|
| 25 |
+
#
|
| 26 |
+
# configuration section:
|
| 27 |
+
# these variables are filled in by the make target in Makefile
|
| 28 |
+
#
|
| 29 |
+
MACHINE="x86_64"
|
| 30 |
+
OS="cygwin"
|
| 31 |
+
CC="gcc"
|
| 32 |
+
CFLAGS="-march=nocona -msahf -mtune=generic -O2 -pipe -D_STATIC_BUILD"
|
| 33 |
+
RELEASE="5.3"
|
| 34 |
+
PATCHLEVEL="9"
|
| 35 |
+
RELSTATUS="release"
|
| 36 |
+
MACHTYPE="x86_64-pc-cygwin"
|
| 37 |
+
|
| 38 |
+
PATH=/bin:/usr/bin:/usr/local/bin:$PATH
|
| 39 |
+
export PATH
|
| 40 |
+
|
| 41 |
+
# Check if TMPDIR is set, default to /tmp
|
| 42 |
+
: ${TMPDIR:=/tmp}
|
| 43 |
+
|
| 44 |
+
#Securely create a temporary directory for the temporary files
|
| 45 |
+
TEMPDIR=$TMPDIR/bbug.$$
|
| 46 |
+
(umask 077 && mkdir "$TEMPDIR") || {
|
| 47 |
+
echo "$0: could not create temporary directory" >&2
|
| 48 |
+
exit 1
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
TEMPFILE1=$TEMPDIR/bbug1
|
| 52 |
+
TEMPFILE2=$TEMPDIR/bbug2
|
| 53 |
+
|
| 54 |
+
USAGE="Usage: $0 [--help] [--version] [bug-report-email-address]"
|
| 55 |
+
VERSTR="GNU bashbug, version ${RELEASE}.${PATCHLEVEL}-${RELSTATUS}"
|
| 56 |
+
|
| 57 |
+
do_help= do_version=
|
| 58 |
+
|
| 59 |
+
while [ $# -gt 0 ]; do
|
| 60 |
+
case "$1" in
|
| 61 |
+
--help) shift ; do_help=y ;;
|
| 62 |
+
--version) shift ; do_version=y ;;
|
| 63 |
+
--) shift ; break ;;
|
| 64 |
+
-*) echo "bashbug: ${1}: invalid option" >&2
|
| 65 |
+
echo "$USAGE" >&2
|
| 66 |
+
exit 2 ;;
|
| 67 |
+
*) break ;;
|
| 68 |
+
esac
|
| 69 |
+
done
|
| 70 |
+
|
| 71 |
+
if [ -n "$do_version" ]; then
|
| 72 |
+
echo "${VERSTR}"
|
| 73 |
+
exit 0
|
| 74 |
+
fi
|
| 75 |
+
|
| 76 |
+
if [ -n "$do_help" ]; then
|
| 77 |
+
echo "${VERSTR}"
|
| 78 |
+
echo "${USAGE}"
|
| 79 |
+
echo
|
| 80 |
+
cat << HERE_EOF
|
| 81 |
+
Bashbug is used to send mail to the Bash maintainers
|
| 82 |
+
for when Bash doesn't behave like you'd like, or expect.
|
| 83 |
+
|
| 84 |
+
Bashbug will start up your editor (as defined by the shell's
|
| 85 |
+
EDITOR environment variable) with a preformatted bug report
|
| 86 |
+
template for you to fill in. The report will be mailed to the
|
| 87 |
+
bug-bash mailing list by default. See the manual for details.
|
| 88 |
+
|
| 89 |
+
If you invoke bashbug by accident, just quit your editor without
|
| 90 |
+
saving any changes to the template, and no bug report will be sent.
|
| 91 |
+
HERE_EOF
|
| 92 |
+
exit 0
|
| 93 |
+
fi
|
| 94 |
+
|
| 95 |
+
# Figure out how to echo a string without a trailing newline
|
| 96 |
+
N=`echo 'hi there\c'`
|
| 97 |
+
case "$N" in
|
| 98 |
+
*c) n=-n c= ;;
|
| 99 |
+
*) n= c='\c' ;;
|
| 100 |
+
esac
|
| 101 |
+
|
| 102 |
+
BASHTESTERS="bash-testers@cwru.edu"
|
| 103 |
+
|
| 104 |
+
case "$RELSTATUS" in
|
| 105 |
+
alpha*|beta*|devel*|rc*) BUGBASH=chet.ramey@case.edu ;;
|
| 106 |
+
*) BUGBASH=bug-bash@gnu.org ;;
|
| 107 |
+
esac
|
| 108 |
+
|
| 109 |
+
case "$RELSTATUS" in
|
| 110 |
+
alpha*|beta*|devel*|rc*)
|
| 111 |
+
echo "$0: This is a testing release. Would you like your bug report"
|
| 112 |
+
echo "$0: to be sent to the bash-testers mailing list?"
|
| 113 |
+
echo $n "$0: Send to bash-testers? $c"
|
| 114 |
+
read ans
|
| 115 |
+
case "$ans" in
|
| 116 |
+
y*|Y*) BUGBASH="${BUGBASH},${BASHTESTERS}" ;;
|
| 117 |
+
esac ;;
|
| 118 |
+
esac
|
| 119 |
+
|
| 120 |
+
BUGADDR="${1-$BUGBASH}"
|
| 121 |
+
|
| 122 |
+
if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; then
|
| 123 |
+
if [ -x /usr/bin/editor ]; then
|
| 124 |
+
DEFEDITOR=editor
|
| 125 |
+
elif [ -x /usr/local/bin/ce ]; then
|
| 126 |
+
DEFEDITOR=ce
|
| 127 |
+
elif [ -x /usr/local/bin/emacs ]; then
|
| 128 |
+
DEFEDITOR=emacs
|
| 129 |
+
elif [ -x /usr/contrib/bin/emacs ]; then
|
| 130 |
+
DEFEDITOR=emacs
|
| 131 |
+
elif [ -x /usr/bin/emacs ]; then
|
| 132 |
+
DEFEDITOR=emacs
|
| 133 |
+
elif [ -x /usr/bin/xemacs ]; then
|
| 134 |
+
DEFEDITOR=xemacs
|
| 135 |
+
elif [ -x /usr/bin/vim ]; then
|
| 136 |
+
DEFEDITOR=vim
|
| 137 |
+
elif [ -x /usr/bin/gvim ]; then
|
| 138 |
+
DEFEDITOR=gvim
|
| 139 |
+
elif [ -x /usr/bin/nano ]; then
|
| 140 |
+
DEFEDITOR=nano
|
| 141 |
+
elif [ -x /usr/contrib/bin/jove ]; then
|
| 142 |
+
DEFEDITOR=jove
|
| 143 |
+
elif [ -x /usr/local/bin/jove ]; then
|
| 144 |
+
DEFEDITOR=jove
|
| 145 |
+
elif [ -x /usr/bin/vi ]; then
|
| 146 |
+
DEFEDITOR=vi
|
| 147 |
+
else
|
| 148 |
+
echo "$0: No default editor found: attempting to use vi" >&2
|
| 149 |
+
DEFEDITOR=vi
|
| 150 |
+
fi
|
| 151 |
+
fi
|
| 152 |
+
|
| 153 |
+
|
| 154 |
+
: ${EDITOR=$DEFEDITOR}
|
| 155 |
+
|
| 156 |
+
: ${USER=${LOGNAME-`whoami`}}
|
| 157 |
+
|
| 158 |
+
trap 'rm -rf "$TEMPDIR"; exit 1' 1 2 3 13 15
|
| 159 |
+
trap 'rm -rf "$TEMPDIR"' 0
|
| 160 |
+
|
| 161 |
+
UN=
|
| 162 |
+
if (uname) >/dev/null 2>&1; then
|
| 163 |
+
UN=`uname -a`
|
| 164 |
+
fi
|
| 165 |
+
|
| 166 |
+
if [ -f /usr/lib/sendmail ] ; then
|
| 167 |
+
RMAIL="/usr/lib/sendmail"
|
| 168 |
+
SMARGS="-i -t"
|
| 169 |
+
elif [ -f /usr/sbin/sendmail ] ; then
|
| 170 |
+
RMAIL="/usr/sbin/sendmail"
|
| 171 |
+
SMARGS="-i -t"
|
| 172 |
+
else
|
| 173 |
+
RMAIL=rmail
|
| 174 |
+
SMARGS="$BUGADDR"
|
| 175 |
+
fi
|
| 176 |
+
|
| 177 |
+
INITIAL_SUBJECT='[50 character or so descriptive subject here (for reference)]'
|
| 178 |
+
|
| 179 |
+
cat > "$TEMPFILE1" <<EOF
|
| 180 |
+
From: ${USER}
|
| 181 |
+
To: ${BUGADDR}
|
| 182 |
+
Subject: ${INITIAL_SUBJECT}
|
| 183 |
+
|
| 184 |
+
Configuration Information [Automatically generated, do not change]:
|
| 185 |
+
Machine: $MACHINE
|
| 186 |
+
OS: $OS
|
| 187 |
+
Compiler: $CC
|
| 188 |
+
Compilation CFLAGS: $CFLAGS
|
| 189 |
+
uname output: $UN
|
| 190 |
+
Machine Type: $MACHTYPE
|
| 191 |
+
|
| 192 |
+
Bash Version: $RELEASE
|
| 193 |
+
Patch Level: $PATCHLEVEL
|
| 194 |
+
Release Status: $RELSTATUS
|
| 195 |
+
|
| 196 |
+
Description:
|
| 197 |
+
[Detailed description of the problem, suggestion, or complaint.]
|
| 198 |
+
|
| 199 |
+
Repeat-By:
|
| 200 |
+
[Describe the sequence of events that causes the problem
|
| 201 |
+
to occur.]
|
| 202 |
+
|
| 203 |
+
Fix:
|
| 204 |
+
[Description of how to fix the problem. If you don't know a
|
| 205 |
+
fix for the problem, don't include this section.]
|
| 206 |
+
EOF
|
| 207 |
+
|
| 208 |
+
cp "$TEMPFILE1" "$TEMPFILE2"
|
| 209 |
+
chmod u+w "$TEMPFILE1"
|
| 210 |
+
|
| 211 |
+
trap '' 2 # ignore interrupts while in editor
|
| 212 |
+
|
| 213 |
+
edstat=1
|
| 214 |
+
while [ $edstat -ne 0 ]; do
|
| 215 |
+
$EDITOR "$TEMPFILE1"
|
| 216 |
+
edstat=$?
|
| 217 |
+
|
| 218 |
+
if [ $edstat -ne 0 ]; then
|
| 219 |
+
echo "$0: editor \`$EDITOR' exited with nonzero status."
|
| 220 |
+
echo "$0: Perhaps it was interrupted."
|
| 221 |
+
echo "$0: Type \`y' to give up, and lose your bug report;"
|
| 222 |
+
echo "$0: type \`n' to re-enter the editor."
|
| 223 |
+
echo $n "$0: Do you want to give up? $c"
|
| 224 |
+
|
| 225 |
+
read ans
|
| 226 |
+
case "$ans" in
|
| 227 |
+
[Yy]*) exit 1 ;;
|
| 228 |
+
esac
|
| 229 |
+
|
| 230 |
+
continue
|
| 231 |
+
fi
|
| 232 |
+
|
| 233 |
+
# find the subject from the temp file and see if it's been changed
|
| 234 |
+
CURR_SUB=`grep '^Subject: ' "$TEMPFILE1" | sed 's|^Subject:[ ]*||' | sed 1q`
|
| 235 |
+
|
| 236 |
+
case "$CURR_SUB" in
|
| 237 |
+
"${INITIAL_SUBJECT}")
|
| 238 |
+
echo
|
| 239 |
+
echo "$0: You have not changed the subject from the default."
|
| 240 |
+
echo "$0: Please use a more descriptive subject header."
|
| 241 |
+
echo "$0: Type \`y' to give up, and lose your bug report;"
|
| 242 |
+
echo "$0: type \`n' to re-enter the editor."
|
| 243 |
+
echo $n "$0: Do you want to give up? $c"
|
| 244 |
+
|
| 245 |
+
read ans
|
| 246 |
+
case "$ans" in
|
| 247 |
+
[Yy]*) exit 1 ;;
|
| 248 |
+
esac
|
| 249 |
+
|
| 250 |
+
echo "$0: The editor will be restarted in five seconds."
|
| 251 |
+
sleep 5
|
| 252 |
+
edstat=1
|
| 253 |
+
;;
|
| 254 |
+
esac
|
| 255 |
+
|
| 256 |
+
done
|
| 257 |
+
|
| 258 |
+
trap 'rm -rf "$TEMPDIR"; exit 1' 2 # restore trap on SIGINT
|
| 259 |
+
|
| 260 |
+
if cmp -s "$TEMPFILE1" "$TEMPFILE2"
|
| 261 |
+
then
|
| 262 |
+
echo "File not changed, no bug report submitted."
|
| 263 |
+
exit
|
| 264 |
+
fi
|
| 265 |
+
|
| 266 |
+
echo $n "Send bug report to ${BUGADDR}? [y/n] $c"
|
| 267 |
+
read ans
|
| 268 |
+
case "$ans" in
|
| 269 |
+
[Nn]*) exit 0 ;;
|
| 270 |
+
esac
|
| 271 |
+
|
| 272 |
+
${RMAIL} $SMARGS < "$TEMPFILE1" || {
|
| 273 |
+
cat "$TEMPFILE1" >> $HOME/dead.bashbug
|
| 274 |
+
echo "$0: mail to ${BUGADDR} failed: report saved in $HOME/dead.bashbug" >&2
|
| 275 |
+
echo "$0: please send it manually to ${BUGADDR}" >&2
|
| 276 |
+
}
|
| 277 |
+
|
| 278 |
+
exit 0
|
git/usr/bin/bunzip2.exe
ADDED
|
Binary file (92.2 kB). View file
|
|
|
git/usr/bin/bzcat.exe
ADDED
|
Binary file (92.2 kB). View file
|
|
|
git/usr/bin/bzcmp
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/sh
|
| 2 |
+
# sh is buggy on RS/6000 AIX 3.2. Replace above line with #!/bin/ksh
|
| 3 |
+
|
| 4 |
+
# Bzcmp/diff wrapped for bzip2,
|
| 5 |
+
# adapted from zdiff by Philippe Troin <phil@fifi.org> for Debian GNU/Linux.
|
| 6 |
+
|
| 7 |
+
# Bzcmp and bzdiff are used to invoke the cmp or the diff pro-
|
| 8 |
+
# gram on compressed files. All options specified are passed
|
| 9 |
+
# directly to cmp or diff. If only 1 file is specified, then
|
| 10 |
+
# the files compared are file1 and an uncompressed file1.gz.
|
| 11 |
+
# If two files are specified, then they are uncompressed (if
|
| 12 |
+
# necessary) and fed to cmp or diff. The exit status from cmp
|
| 13 |
+
# or diff is preserved.
|
| 14 |
+
|
| 15 |
+
PATH="/usr/bin:/bin:$PATH"; export PATH
|
| 16 |
+
prog=`echo $0 | sed 's|.*/||'`
|
| 17 |
+
case "$prog" in
|
| 18 |
+
*cmp) comp=${CMP-cmp} ;;
|
| 19 |
+
*) comp=${DIFF-diff} ;;
|
| 20 |
+
esac
|
| 21 |
+
|
| 22 |
+
OPTIONS=
|
| 23 |
+
FILES=
|
| 24 |
+
for ARG
|
| 25 |
+
do
|
| 26 |
+
case "$ARG" in
|
| 27 |
+
-*) OPTIONS="$OPTIONS $ARG";;
|
| 28 |
+
*) if test -f "$ARG"; then
|
| 29 |
+
FILES="$FILES $ARG"
|
| 30 |
+
else
|
| 31 |
+
echo "${prog}: $ARG not found or not a regular file"
|
| 32 |
+
exit 1
|
| 33 |
+
fi ;;
|
| 34 |
+
esac
|
| 35 |
+
done
|
| 36 |
+
if test -z "$FILES"; then
|
| 37 |
+
echo "Usage: $prog [${comp}_options] file [file]"
|
| 38 |
+
exit 1
|
| 39 |
+
fi
|
| 40 |
+
set $FILES
|
| 41 |
+
if test $# -eq 1; then
|
| 42 |
+
FILE=`echo "$1" | sed 's/.bz2$//'`
|
| 43 |
+
bzip2 -cd "$FILE.bz2" | $comp $OPTIONS - "$FILE"
|
| 44 |
+
STAT="$?"
|
| 45 |
+
|
| 46 |
+
elif test $# -eq 2; then
|
| 47 |
+
case "$1" in
|
| 48 |
+
*.bz2)
|
| 49 |
+
case "$2" in
|
| 50 |
+
*.bz2)
|
| 51 |
+
F=`echo "$2" | sed 's|.*/||;s|.bz2$||'`
|
| 52 |
+
tmp=`mktemp "${TMPDIR:-/tmp}"/bzdiff.XXXXXXXXXX` || {
|
| 53 |
+
echo 'cannot create a temporary file' >&2
|
| 54 |
+
exit 1
|
| 55 |
+
}
|
| 56 |
+
bzip2 -cdfq "$2" > "$tmp"
|
| 57 |
+
bzip2 -cdfq "$1" | $comp $OPTIONS - "$tmp"
|
| 58 |
+
STAT="$?"
|
| 59 |
+
/bin/rm -f "$tmp";;
|
| 60 |
+
|
| 61 |
+
*) bzip2 -cdfq "$1" | $comp $OPTIONS - "$2"
|
| 62 |
+
STAT="$?";;
|
| 63 |
+
esac;;
|
| 64 |
+
*) case "$2" in
|
| 65 |
+
*.bz2)
|
| 66 |
+
bzip2 -cdfq "$2" | $comp $OPTIONS "$1" -
|
| 67 |
+
STAT="$?";;
|
| 68 |
+
*) $comp $OPTIONS "$1" "$2"
|
| 69 |
+
STAT="$?";;
|
| 70 |
+
esac;;
|
| 71 |
+
esac
|
| 72 |
+
else
|
| 73 |
+
echo "Usage: $prog [${comp}_options] file [file]"
|
| 74 |
+
exit 1
|
| 75 |
+
fi
|
| 76 |
+
exit "$STAT"
|
git/usr/bin/bzdiff
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/sh
|
| 2 |
+
# sh is buggy on RS/6000 AIX 3.2. Replace above line with #!/bin/ksh
|
| 3 |
+
|
| 4 |
+
# Bzcmp/diff wrapped for bzip2,
|
| 5 |
+
# adapted from zdiff by Philippe Troin <phil@fifi.org> for Debian GNU/Linux.
|
| 6 |
+
|
| 7 |
+
# Bzcmp and bzdiff are used to invoke the cmp or the diff pro-
|
| 8 |
+
# gram on compressed files. All options specified are passed
|
| 9 |
+
# directly to cmp or diff. If only 1 file is specified, then
|
| 10 |
+
# the files compared are file1 and an uncompressed file1.gz.
|
| 11 |
+
# If two files are specified, then they are uncompressed (if
|
| 12 |
+
# necessary) and fed to cmp or diff. The exit status from cmp
|
| 13 |
+
# or diff is preserved.
|
| 14 |
+
|
| 15 |
+
PATH="/usr/bin:/bin:$PATH"; export PATH
|
| 16 |
+
prog=`echo $0 | sed 's|.*/||'`
|
| 17 |
+
case "$prog" in
|
| 18 |
+
*cmp) comp=${CMP-cmp} ;;
|
| 19 |
+
*) comp=${DIFF-diff} ;;
|
| 20 |
+
esac
|
| 21 |
+
|
| 22 |
+
OPTIONS=
|
| 23 |
+
FILES=
|
| 24 |
+
for ARG
|
| 25 |
+
do
|
| 26 |
+
case "$ARG" in
|
| 27 |
+
-*) OPTIONS="$OPTIONS $ARG";;
|
| 28 |
+
*) if test -f "$ARG"; then
|
| 29 |
+
FILES="$FILES $ARG"
|
| 30 |
+
else
|
| 31 |
+
echo "${prog}: $ARG not found or not a regular file"
|
| 32 |
+
exit 1
|
| 33 |
+
fi ;;
|
| 34 |
+
esac
|
| 35 |
+
done
|
| 36 |
+
if test -z "$FILES"; then
|
| 37 |
+
echo "Usage: $prog [${comp}_options] file [file]"
|
| 38 |
+
exit 1
|
| 39 |
+
fi
|
| 40 |
+
set $FILES
|
| 41 |
+
if test $# -eq 1; then
|
| 42 |
+
FILE=`echo "$1" | sed 's/.bz2$//'`
|
| 43 |
+
bzip2 -cd "$FILE.bz2" | $comp $OPTIONS - "$FILE"
|
| 44 |
+
STAT="$?"
|
| 45 |
+
|
| 46 |
+
elif test $# -eq 2; then
|
| 47 |
+
case "$1" in
|
| 48 |
+
*.bz2)
|
| 49 |
+
case "$2" in
|
| 50 |
+
*.bz2)
|
| 51 |
+
F=`echo "$2" | sed 's|.*/||;s|.bz2$||'`
|
| 52 |
+
tmp=`mktemp "${TMPDIR:-/tmp}"/bzdiff.XXXXXXXXXX` || {
|
| 53 |
+
echo 'cannot create a temporary file' >&2
|
| 54 |
+
exit 1
|
| 55 |
+
}
|
| 56 |
+
bzip2 -cdfq "$2" > "$tmp"
|
| 57 |
+
bzip2 -cdfq "$1" | $comp $OPTIONS - "$tmp"
|
| 58 |
+
STAT="$?"
|
| 59 |
+
/bin/rm -f "$tmp";;
|
| 60 |
+
|
| 61 |
+
*) bzip2 -cdfq "$1" | $comp $OPTIONS - "$2"
|
| 62 |
+
STAT="$?";;
|
| 63 |
+
esac;;
|
| 64 |
+
*) case "$2" in
|
| 65 |
+
*.bz2)
|
| 66 |
+
bzip2 -cdfq "$2" | $comp $OPTIONS "$1" -
|
| 67 |
+
STAT="$?";;
|
| 68 |
+
*) $comp $OPTIONS "$1" "$2"
|
| 69 |
+
STAT="$?";;
|
| 70 |
+
esac;;
|
| 71 |
+
esac
|
| 72 |
+
else
|
| 73 |
+
echo "Usage: $prog [${comp}_options] file [file]"
|
| 74 |
+
exit 1
|
| 75 |
+
fi
|
| 76 |
+
exit "$STAT"
|
git/usr/bin/bzegrep
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/sh
|
| 2 |
+
|
| 3 |
+
# Bzgrep wrapped for bzip2,
|
| 4 |
+
# adapted from zgrep by Philippe Troin <phil@fifi.org> for Debian GNU/Linux.
|
| 5 |
+
## zgrep notice:
|
| 6 |
+
## zgrep -- a wrapper around a grep program that decompresses files as needed
|
| 7 |
+
## Adapted from a version sent by Charles Levert <charles@comm.polymtl.ca>
|
| 8 |
+
|
| 9 |
+
PATH="/usr/bin:$PATH"; export PATH
|
| 10 |
+
|
| 11 |
+
prog=`echo $0 | sed 's|.*/||'`
|
| 12 |
+
case "$prog" in
|
| 13 |
+
*egrep) grep=${EGREP-egrep} ;;
|
| 14 |
+
*fgrep) grep=${FGREP-fgrep} ;;
|
| 15 |
+
*) grep=${GREP-grep} ;;
|
| 16 |
+
esac
|
| 17 |
+
pat=""
|
| 18 |
+
while test $# -ne 0; do
|
| 19 |
+
case "$1" in
|
| 20 |
+
-e | -f) opt="$opt $1"; shift; pat="$1"
|
| 21 |
+
if test "$grep" = grep; then # grep is buggy with -e on SVR4
|
| 22 |
+
grep=egrep
|
| 23 |
+
fi;;
|
| 24 |
+
-A | -B) opt="$opt $1 $2"; shift;;
|
| 25 |
+
-*) opt="$opt $1";;
|
| 26 |
+
*) if test -z "$pat"; then
|
| 27 |
+
pat="$1"
|
| 28 |
+
else
|
| 29 |
+
break;
|
| 30 |
+
fi;;
|
| 31 |
+
esac
|
| 32 |
+
shift
|
| 33 |
+
done
|
| 34 |
+
|
| 35 |
+
if test -z "$pat"; then
|
| 36 |
+
echo "grep through bzip2 files"
|
| 37 |
+
echo "usage: $prog [grep_options] pattern [files]"
|
| 38 |
+
exit 1
|
| 39 |
+
fi
|
| 40 |
+
|
| 41 |
+
list=0
|
| 42 |
+
silent=0
|
| 43 |
+
op=`echo "$opt" | sed -e 's/ //g' -e 's/-//g'`
|
| 44 |
+
case "$op" in
|
| 45 |
+
*l*) list=1
|
| 46 |
+
esac
|
| 47 |
+
case "$op" in
|
| 48 |
+
*h*) silent=1
|
| 49 |
+
esac
|
| 50 |
+
|
| 51 |
+
if test $# -eq 0; then
|
| 52 |
+
bzip2 -cdfq | $grep $opt "$pat"
|
| 53 |
+
exit $?
|
| 54 |
+
fi
|
| 55 |
+
|
| 56 |
+
res=0
|
| 57 |
+
for i do
|
| 58 |
+
if test -f "$i"; then :; else if test -f "$i.bz2"; then i="$i.bz2"; fi; fi
|
| 59 |
+
if test $list -eq 1; then
|
| 60 |
+
bzip2 -cdfq "$i" | $grep $opt "$pat" 2>&1 > /dev/null && echo $i
|
| 61 |
+
r=$?
|
| 62 |
+
elif test $# -eq 1 -o $silent -eq 1; then
|
| 63 |
+
bzip2 -cdfq "$i" | $grep $opt "$pat"
|
| 64 |
+
r=$?
|
| 65 |
+
else
|
| 66 |
+
j=$(echo "$i" | sed 's/\\/&&/g;s/|/\\&/g;s/&/\\&/g')
|
| 67 |
+
j=`printf "%s" "$j" | tr '\n' ' '`
|
| 68 |
+
# A trick adapted from
|
| 69 |
+
# https://groups.google.com/forum/#!original/comp.unix.shell/x1345iu10eg/Nn1n-1r1uU0J
|
| 70 |
+
# that has the same effect as the following bash code:
|
| 71 |
+
# bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${j}:|"
|
| 72 |
+
# r=${PIPESTATUS[1]}
|
| 73 |
+
exec 3>&1
|
| 74 |
+
eval `
|
| 75 |
+
exec 4>&1 >&3 3>&-
|
| 76 |
+
{
|
| 77 |
+
bzip2 -cdfq "$i" 4>&-
|
| 78 |
+
} | {
|
| 79 |
+
$grep $opt "$pat" 4>&-; echo "r=$?;" >&4
|
| 80 |
+
} | sed "s|^|${j}:|"
|
| 81 |
+
`
|
| 82 |
+
fi
|
| 83 |
+
test "$r" -ne 0 && res="$r"
|
| 84 |
+
done
|
| 85 |
+
exit $res
|
git/usr/bin/bzfgrep
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/sh
|
| 2 |
+
|
| 3 |
+
# Bzgrep wrapped for bzip2,
|
| 4 |
+
# adapted from zgrep by Philippe Troin <phil@fifi.org> for Debian GNU/Linux.
|
| 5 |
+
## zgrep notice:
|
| 6 |
+
## zgrep -- a wrapper around a grep program that decompresses files as needed
|
| 7 |
+
## Adapted from a version sent by Charles Levert <charles@comm.polymtl.ca>
|
| 8 |
+
|
| 9 |
+
PATH="/usr/bin:$PATH"; export PATH
|
| 10 |
+
|
| 11 |
+
prog=`echo $0 | sed 's|.*/||'`
|
| 12 |
+
case "$prog" in
|
| 13 |
+
*egrep) grep=${EGREP-egrep} ;;
|
| 14 |
+
*fgrep) grep=${FGREP-fgrep} ;;
|
| 15 |
+
*) grep=${GREP-grep} ;;
|
| 16 |
+
esac
|
| 17 |
+
pat=""
|
| 18 |
+
while test $# -ne 0; do
|
| 19 |
+
case "$1" in
|
| 20 |
+
-e | -f) opt="$opt $1"; shift; pat="$1"
|
| 21 |
+
if test "$grep" = grep; then # grep is buggy with -e on SVR4
|
| 22 |
+
grep=egrep
|
| 23 |
+
fi;;
|
| 24 |
+
-A | -B) opt="$opt $1 $2"; shift;;
|
| 25 |
+
-*) opt="$opt $1";;
|
| 26 |
+
*) if test -z "$pat"; then
|
| 27 |
+
pat="$1"
|
| 28 |
+
else
|
| 29 |
+
break;
|
| 30 |
+
fi;;
|
| 31 |
+
esac
|
| 32 |
+
shift
|
| 33 |
+
done
|
| 34 |
+
|
| 35 |
+
if test -z "$pat"; then
|
| 36 |
+
echo "grep through bzip2 files"
|
| 37 |
+
echo "usage: $prog [grep_options] pattern [files]"
|
| 38 |
+
exit 1
|
| 39 |
+
fi
|
| 40 |
+
|
| 41 |
+
list=0
|
| 42 |
+
silent=0
|
| 43 |
+
op=`echo "$opt" | sed -e 's/ //g' -e 's/-//g'`
|
| 44 |
+
case "$op" in
|
| 45 |
+
*l*) list=1
|
| 46 |
+
esac
|
| 47 |
+
case "$op" in
|
| 48 |
+
*h*) silent=1
|
| 49 |
+
esac
|
| 50 |
+
|
| 51 |
+
if test $# -eq 0; then
|
| 52 |
+
bzip2 -cdfq | $grep $opt "$pat"
|
| 53 |
+
exit $?
|
| 54 |
+
fi
|
| 55 |
+
|
| 56 |
+
res=0
|
| 57 |
+
for i do
|
| 58 |
+
if test -f "$i"; then :; else if test -f "$i.bz2"; then i="$i.bz2"; fi; fi
|
| 59 |
+
if test $list -eq 1; then
|
| 60 |
+
bzip2 -cdfq "$i" | $grep $opt "$pat" 2>&1 > /dev/null && echo $i
|
| 61 |
+
r=$?
|
| 62 |
+
elif test $# -eq 1 -o $silent -eq 1; then
|
| 63 |
+
bzip2 -cdfq "$i" | $grep $opt "$pat"
|
| 64 |
+
r=$?
|
| 65 |
+
else
|
| 66 |
+
j=$(echo "$i" | sed 's/\\/&&/g;s/|/\\&/g;s/&/\\&/g')
|
| 67 |
+
j=`printf "%s" "$j" | tr '\n' ' '`
|
| 68 |
+
# A trick adapted from
|
| 69 |
+
# https://groups.google.com/forum/#!original/comp.unix.shell/x1345iu10eg/Nn1n-1r1uU0J
|
| 70 |
+
# that has the same effect as the following bash code:
|
| 71 |
+
# bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${j}:|"
|
| 72 |
+
# r=${PIPESTATUS[1]}
|
| 73 |
+
exec 3>&1
|
| 74 |
+
eval `
|
| 75 |
+
exec 4>&1 >&3 3>&-
|
| 76 |
+
{
|
| 77 |
+
bzip2 -cdfq "$i" 4>&-
|
| 78 |
+
} | {
|
| 79 |
+
$grep $opt "$pat" 4>&-; echo "r=$?;" >&4
|
| 80 |
+
} | sed "s|^|${j}:|"
|
| 81 |
+
`
|
| 82 |
+
fi
|
| 83 |
+
test "$r" -ne 0 && res="$r"
|
| 84 |
+
done
|
| 85 |
+
exit $res
|
git/usr/bin/bzgrep
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/sh
|
| 2 |
+
|
| 3 |
+
# Bzgrep wrapped for bzip2,
|
| 4 |
+
# adapted from zgrep by Philippe Troin <phil@fifi.org> for Debian GNU/Linux.
|
| 5 |
+
## zgrep notice:
|
| 6 |
+
## zgrep -- a wrapper around a grep program that decompresses files as needed
|
| 7 |
+
## Adapted from a version sent by Charles Levert <charles@comm.polymtl.ca>
|
| 8 |
+
|
| 9 |
+
PATH="/usr/bin:$PATH"; export PATH
|
| 10 |
+
|
| 11 |
+
prog=`echo $0 | sed 's|.*/||'`
|
| 12 |
+
case "$prog" in
|
| 13 |
+
*egrep) grep=${EGREP-egrep} ;;
|
| 14 |
+
*fgrep) grep=${FGREP-fgrep} ;;
|
| 15 |
+
*) grep=${GREP-grep} ;;
|
| 16 |
+
esac
|
| 17 |
+
pat=""
|
| 18 |
+
while test $# -ne 0; do
|
| 19 |
+
case "$1" in
|
| 20 |
+
-e | -f) opt="$opt $1"; shift; pat="$1"
|
| 21 |
+
if test "$grep" = grep; then # grep is buggy with -e on SVR4
|
| 22 |
+
grep=egrep
|
| 23 |
+
fi;;
|
| 24 |
+
-A | -B) opt="$opt $1 $2"; shift;;
|
| 25 |
+
-*) opt="$opt $1";;
|
| 26 |
+
*) if test -z "$pat"; then
|
| 27 |
+
pat="$1"
|
| 28 |
+
else
|
| 29 |
+
break;
|
| 30 |
+
fi;;
|
| 31 |
+
esac
|
| 32 |
+
shift
|
| 33 |
+
done
|
| 34 |
+
|
| 35 |
+
if test -z "$pat"; then
|
| 36 |
+
echo "grep through bzip2 files"
|
| 37 |
+
echo "usage: $prog [grep_options] pattern [files]"
|
| 38 |
+
exit 1
|
| 39 |
+
fi
|
| 40 |
+
|
| 41 |
+
list=0
|
| 42 |
+
silent=0
|
| 43 |
+
op=`echo "$opt" | sed -e 's/ //g' -e 's/-//g'`
|
| 44 |
+
case "$op" in
|
| 45 |
+
*l*) list=1
|
| 46 |
+
esac
|
| 47 |
+
case "$op" in
|
| 48 |
+
*h*) silent=1
|
| 49 |
+
esac
|
| 50 |
+
|
| 51 |
+
if test $# -eq 0; then
|
| 52 |
+
bzip2 -cdfq | $grep $opt "$pat"
|
| 53 |
+
exit $?
|
| 54 |
+
fi
|
| 55 |
+
|
| 56 |
+
res=0
|
| 57 |
+
for i do
|
| 58 |
+
if test -f "$i"; then :; else if test -f "$i.bz2"; then i="$i.bz2"; fi; fi
|
| 59 |
+
if test $list -eq 1; then
|
| 60 |
+
bzip2 -cdfq "$i" | $grep $opt "$pat" 2>&1 > /dev/null && echo $i
|
| 61 |
+
r=$?
|
| 62 |
+
elif test $# -eq 1 -o $silent -eq 1; then
|
| 63 |
+
bzip2 -cdfq "$i" | $grep $opt "$pat"
|
| 64 |
+
r=$?
|
| 65 |
+
else
|
| 66 |
+
j=$(echo "$i" | sed 's/\\/&&/g;s/|/\\&/g;s/&/\\&/g')
|
| 67 |
+
j=`printf "%s" "$j" | tr '\n' ' '`
|
| 68 |
+
# A trick adapted from
|
| 69 |
+
# https://groups.google.com/forum/#!original/comp.unix.shell/x1345iu10eg/Nn1n-1r1uU0J
|
| 70 |
+
# that has the same effect as the following bash code:
|
| 71 |
+
# bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${j}:|"
|
| 72 |
+
# r=${PIPESTATUS[1]}
|
| 73 |
+
exec 3>&1
|
| 74 |
+
eval `
|
| 75 |
+
exec 4>&1 >&3 3>&-
|
| 76 |
+
{
|
| 77 |
+
bzip2 -cdfq "$i" 4>&-
|
| 78 |
+
} | {
|
| 79 |
+
$grep $opt "$pat" 4>&-; echo "r=$?;" >&4
|
| 80 |
+
} | sed "s|^|${j}:|"
|
| 81 |
+
`
|
| 82 |
+
fi
|
| 83 |
+
test "$r" -ne 0 && res="$r"
|
| 84 |
+
done
|
| 85 |
+
exit $res
|
git/usr/bin/bzip2.exe
ADDED
|
Binary file (92.2 kB). View file
|
|
|
git/usr/bin/bzip2recover.exe
ADDED
|
Binary file (14.7 kB). View file
|
|
|
git/usr/bin/bzless
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/sh
|
| 2 |
+
|
| 3 |
+
# Bzmore wrapped for bzip2,
|
| 4 |
+
# adapted from zmore by Philippe Troin <phil@fifi.org> for Debian GNU/Linux.
|
| 5 |
+
|
| 6 |
+
PATH="/usr/bin:$PATH"; export PATH
|
| 7 |
+
|
| 8 |
+
prog=`echo $0 | sed 's|.*/||'`
|
| 9 |
+
case "$prog" in
|
| 10 |
+
*less) more=less ;;
|
| 11 |
+
*) more=more ;;
|
| 12 |
+
esac
|
| 13 |
+
|
| 14 |
+
if test "`echo -n a`" = "-n a"; then
|
| 15 |
+
# looks like a SysV system:
|
| 16 |
+
n1=''; n2='\c'
|
| 17 |
+
else
|
| 18 |
+
n1='-n'; n2=''
|
| 19 |
+
fi
|
| 20 |
+
oldtty=`stty -g 2>/dev/null`
|
| 21 |
+
if stty -cbreak 2>/dev/null; then
|
| 22 |
+
cb='cbreak'; ncb='-cbreak'
|
| 23 |
+
else
|
| 24 |
+
# 'stty min 1' resets eof to ^a on both SunOS and SysV!
|
| 25 |
+
cb='min 1 -icanon'; ncb='icanon eof ^d'
|
| 26 |
+
fi
|
| 27 |
+
if test $? -eq 0 && test -n "$oldtty"; then
|
| 28 |
+
trap 'stty $oldtty 2>/dev/null; exit' 0 INT QUIT TRAP USR1 PIPE TERM
|
| 29 |
+
else
|
| 30 |
+
trap 'stty $ncb echo 2>/dev/null; exit' 0 INT QUIT TRAP USR1 PIPE TERM
|
| 31 |
+
fi
|
| 32 |
+
|
| 33 |
+
if test $# = 0; then
|
| 34 |
+
if test -t 0; then
|
| 35 |
+
echo usage: $prog files...
|
| 36 |
+
else
|
| 37 |
+
bzip2 -cdfq | eval $more
|
| 38 |
+
fi
|
| 39 |
+
else
|
| 40 |
+
FIRST=1
|
| 41 |
+
for FILE
|
| 42 |
+
do
|
| 43 |
+
if test $FIRST -eq 0; then
|
| 44 |
+
echo $n1 "--More--(Next file: $FILE)$n2"
|
| 45 |
+
stty $cb -echo 2>/dev/null
|
| 46 |
+
ANS=`dd bs=1 count=1 2>/dev/null`
|
| 47 |
+
stty $ncb echo 2>/dev/null
|
| 48 |
+
echo " "
|
| 49 |
+
if test "$ANS" = 'e' || test "$ANS" = 'q'; then
|
| 50 |
+
exit
|
| 51 |
+
fi
|
| 52 |
+
fi
|
| 53 |
+
if test "$ANS" != 's'; then
|
| 54 |
+
echo "------> $FILE <------"
|
| 55 |
+
bzip2 -cdfq "$FILE" | eval $more
|
| 56 |
+
fi
|
| 57 |
+
if test -t; then
|
| 58 |
+
FIRST=0
|
| 59 |
+
fi
|
| 60 |
+
done
|
| 61 |
+
fi
|
git/usr/bin/c_rehash
ADDED
|
@@ -0,0 +1,254 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env perl
|
| 2 |
+
|
| 3 |
+
# WARNING: do not edit!
|
| 4 |
+
# Generated by Makefile from tools/c_rehash.in
|
| 5 |
+
# Copyright 1999-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
#
|
| 7 |
+
# Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
# this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
# in the file LICENSE in the source distribution or at
|
| 10 |
+
# https://www.openssl.org/source/license.html
|
| 11 |
+
|
| 12 |
+
# Perl c_rehash script, scan all files in a directory
|
| 13 |
+
# and add symbolic links to their hash values.
|
| 14 |
+
|
| 15 |
+
my $dir = "/usr/ssl";
|
| 16 |
+
my $prefix = "/usr";
|
| 17 |
+
|
| 18 |
+
my $errorcount = 0;
|
| 19 |
+
my $openssl = $ENV{OPENSSL} || "openssl";
|
| 20 |
+
my $pwd;
|
| 21 |
+
my $x509hash = "-subject_hash";
|
| 22 |
+
my $crlhash = "-hash";
|
| 23 |
+
my $verbose = 0;
|
| 24 |
+
my $symlink_exists=eval {symlink("",""); 1};
|
| 25 |
+
if ($^O eq "msys") { $symlink_exists=0 };
|
| 26 |
+
my $removelinks = 1;
|
| 27 |
+
|
| 28 |
+
## Parse flags.
|
| 29 |
+
while ( $ARGV[0] =~ /^-/ ) {
|
| 30 |
+
my $flag = shift @ARGV;
|
| 31 |
+
last if ( $flag eq '--');
|
| 32 |
+
if ( $flag eq '-old') {
|
| 33 |
+
$x509hash = "-subject_hash_old";
|
| 34 |
+
$crlhash = "-hash_old";
|
| 35 |
+
} elsif ( $flag eq '-h' || $flag eq '-help' ) {
|
| 36 |
+
help();
|
| 37 |
+
} elsif ( $flag eq '-n' ) {
|
| 38 |
+
$removelinks = 0;
|
| 39 |
+
} elsif ( $flag eq '-v' ) {
|
| 40 |
+
$verbose++;
|
| 41 |
+
}
|
| 42 |
+
else {
|
| 43 |
+
print STDERR "Usage error; try -h.\n";
|
| 44 |
+
exit 1;
|
| 45 |
+
}
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
sub help {
|
| 49 |
+
print "Usage: c_rehash [-old] [-h] [-help] [-v] [dirs...]\n";
|
| 50 |
+
print " -old use old-style digest\n";
|
| 51 |
+
print " -h or -help print this help text\n";
|
| 52 |
+
print " -v print files removed and linked\n";
|
| 53 |
+
exit 0;
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
eval "require Cwd";
|
| 57 |
+
if (defined(&Cwd::getcwd)) {
|
| 58 |
+
$pwd=Cwd::getcwd();
|
| 59 |
+
} else {
|
| 60 |
+
$pwd=`pwd`;
|
| 61 |
+
chomp($pwd);
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
# DOS/Win32 or Unix delimiter? Prefix our installdir, then search.
|
| 65 |
+
my $path_delim = ($pwd =~ /^[a-z]\:/i) ? ';' : ':';
|
| 66 |
+
$ENV{PATH} = "$prefix/bin" . ($ENV{PATH} ? $path_delim . $ENV{PATH} : "");
|
| 67 |
+
|
| 68 |
+
if (!(-f $openssl && -x $openssl)) {
|
| 69 |
+
my $found = 0;
|
| 70 |
+
foreach (split /$path_delim/, $ENV{PATH}) {
|
| 71 |
+
if (-f "$_/$openssl" && -x "$_/$openssl") {
|
| 72 |
+
$found = 1;
|
| 73 |
+
$openssl = "$_/$openssl";
|
| 74 |
+
last;
|
| 75 |
+
}
|
| 76 |
+
}
|
| 77 |
+
if ($found == 0) {
|
| 78 |
+
print STDERR "c_rehash: rehashing skipped ('openssl' program not available)\n";
|
| 79 |
+
exit 0;
|
| 80 |
+
}
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
if (@ARGV) {
|
| 84 |
+
@dirlist = @ARGV;
|
| 85 |
+
} elsif ($ENV{SSL_CERT_DIR}) {
|
| 86 |
+
@dirlist = split /$path_delim/, $ENV{SSL_CERT_DIR};
|
| 87 |
+
} else {
|
| 88 |
+
$dirlist[0] = "$dir/certs";
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
if (-d $dirlist[0]) {
|
| 92 |
+
chdir $dirlist[0];
|
| 93 |
+
$openssl="$pwd/$openssl" if (!(-f $openssl && -x $openssl));
|
| 94 |
+
chdir $pwd;
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
foreach (@dirlist) {
|
| 98 |
+
if (-d $_ ) {
|
| 99 |
+
if ( -w $_) {
|
| 100 |
+
hash_dir($_);
|
| 101 |
+
} else {
|
| 102 |
+
print "Skipping $_, can't write\n";
|
| 103 |
+
$errorcount++;
|
| 104 |
+
}
|
| 105 |
+
}
|
| 106 |
+
}
|
| 107 |
+
exit($errorcount);
|
| 108 |
+
|
| 109 |
+
sub copy_file {
|
| 110 |
+
my ($src_fname, $dst_fname) = @_;
|
| 111 |
+
|
| 112 |
+
if (open(my $in, "<", $src_fname)) {
|
| 113 |
+
if (open(my $out, ">", $dst_fname)) {
|
| 114 |
+
print $out $_ while (<$in>);
|
| 115 |
+
close $out;
|
| 116 |
+
} else {
|
| 117 |
+
warn "Cannot open $dst_fname for write, $!";
|
| 118 |
+
}
|
| 119 |
+
close $in;
|
| 120 |
+
} else {
|
| 121 |
+
warn "Cannot open $src_fname for read, $!";
|
| 122 |
+
}
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
sub hash_dir {
|
| 126 |
+
my $dir = shift;
|
| 127 |
+
my %hashlist;
|
| 128 |
+
|
| 129 |
+
print "Doing $dir\n";
|
| 130 |
+
|
| 131 |
+
if (!chdir $dir) {
|
| 132 |
+
print STDERR "WARNING: Cannot chdir to '$dir', $!\n";
|
| 133 |
+
return;
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
opendir(DIR, ".") || print STDERR "WARNING: Cannot opendir '.', $!\n";
|
| 137 |
+
my @flist = sort readdir(DIR);
|
| 138 |
+
closedir DIR;
|
| 139 |
+
if ( $removelinks ) {
|
| 140 |
+
# Delete any existing symbolic links
|
| 141 |
+
foreach (grep {/^[\da-f]+\.r{0,1}\d+$/} @flist) {
|
| 142 |
+
if (-l $_) {
|
| 143 |
+
print "unlink $_\n" if $verbose;
|
| 144 |
+
unlink $_ || warn "Can't unlink $_, $!\n";
|
| 145 |
+
}
|
| 146 |
+
}
|
| 147 |
+
}
|
| 148 |
+
FILE: foreach $fname (grep {/\.(pem|crt|cer|crl)$/} @flist) {
|
| 149 |
+
# Check to see if certificates and/or CRLs present.
|
| 150 |
+
my ($cert, $crl) = check_file($fname);
|
| 151 |
+
if (!$cert && !$crl) {
|
| 152 |
+
print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
|
| 153 |
+
next;
|
| 154 |
+
}
|
| 155 |
+
link_hash_cert($fname) if ($cert);
|
| 156 |
+
link_hash_crl($fname) if ($crl);
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
chdir $pwd;
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
+
sub check_file {
|
| 163 |
+
my ($is_cert, $is_crl) = (0,0);
|
| 164 |
+
my $fname = $_[0];
|
| 165 |
+
|
| 166 |
+
open(my $in, "<", $fname);
|
| 167 |
+
while(<$in>) {
|
| 168 |
+
if (/^-----BEGIN (.*)-----/) {
|
| 169 |
+
my $hdr = $1;
|
| 170 |
+
if ($hdr =~ /^(X509 |TRUSTED |)CERTIFICATE$/) {
|
| 171 |
+
$is_cert = 1;
|
| 172 |
+
last if ($is_crl);
|
| 173 |
+
} elsif ($hdr eq "X509 CRL") {
|
| 174 |
+
$is_crl = 1;
|
| 175 |
+
last if ($is_cert);
|
| 176 |
+
}
|
| 177 |
+
}
|
| 178 |
+
}
|
| 179 |
+
close $in;
|
| 180 |
+
return ($is_cert, $is_crl);
|
| 181 |
+
}
|
| 182 |
+
|
| 183 |
+
sub compute_hash {
|
| 184 |
+
my $fh;
|
| 185 |
+
if ( $^O eq "VMS" ) {
|
| 186 |
+
# VMS uses the open through shell
|
| 187 |
+
# The file names are safe there and list form is unsupported
|
| 188 |
+
if (!open($fh, "-|", join(' ', @_))) {
|
| 189 |
+
print STDERR "Cannot compute hash on '$fname'\n";
|
| 190 |
+
return;
|
| 191 |
+
}
|
| 192 |
+
} else {
|
| 193 |
+
if (!open($fh, "-|", @_)) {
|
| 194 |
+
print STDERR "Cannot compute hash on '$fname'\n";
|
| 195 |
+
return;
|
| 196 |
+
}
|
| 197 |
+
binmode($fh, ":crlf");
|
| 198 |
+
}
|
| 199 |
+
return (<$fh>, <$fh>);
|
| 200 |
+
}
|
| 201 |
+
|
| 202 |
+
# Link a certificate to its subject name hash value, each hash is of
|
| 203 |
+
# the form <hash>.<n> where n is an integer. If the hash value already exists
|
| 204 |
+
# then we need to up the value of n, unless its a duplicate in which
|
| 205 |
+
# case we skip the link. We check for duplicates by comparing the
|
| 206 |
+
# certificate fingerprints
|
| 207 |
+
|
| 208 |
+
sub link_hash_cert {
|
| 209 |
+
link_hash($_[0], 'cert');
|
| 210 |
+
}
|
| 211 |
+
|
| 212 |
+
# Same as above except for a CRL. CRL links are of the form <hash>.r<n>
|
| 213 |
+
|
| 214 |
+
sub link_hash_crl {
|
| 215 |
+
link_hash($_[0], 'crl');
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
+
sub link_hash {
|
| 219 |
+
my ($fname, $type) = @_;
|
| 220 |
+
my $is_cert = $type eq 'cert';
|
| 221 |
+
|
| 222 |
+
my ($hash, $fprint) = compute_hash($openssl,
|
| 223 |
+
$is_cert ? "x509" : "crl",
|
| 224 |
+
$is_cert ? $x509hash : $crlhash,
|
| 225 |
+
"-fingerprint", "-noout",
|
| 226 |
+
"-in", $fname);
|
| 227 |
+
chomp $hash;
|
| 228 |
+
$hash =~ s/^.*=// if !$is_cert;
|
| 229 |
+
chomp $fprint;
|
| 230 |
+
return if !$hash;
|
| 231 |
+
$fprint =~ s/^.*=//;
|
| 232 |
+
$fprint =~ tr/://d;
|
| 233 |
+
my $suffix = 0;
|
| 234 |
+
# Search for an unused hash filename
|
| 235 |
+
my $crlmark = $is_cert ? "" : "r";
|
| 236 |
+
while(exists $hashlist{"$hash.$crlmark$suffix"}) {
|
| 237 |
+
# Hash matches: if fingerprint matches its a duplicate cert
|
| 238 |
+
if ($hashlist{"$hash.$crlmark$suffix"} eq $fprint) {
|
| 239 |
+
my $what = $is_cert ? 'certificate' : 'CRL';
|
| 240 |
+
print STDERR "WARNING: Skipping duplicate $what $fname\n";
|
| 241 |
+
return;
|
| 242 |
+
}
|
| 243 |
+
$suffix++;
|
| 244 |
+
}
|
| 245 |
+
$hash .= ".$crlmark$suffix";
|
| 246 |
+
if ($symlink_exists) {
|
| 247 |
+
print "link $fname -> $hash\n" if $verbose;
|
| 248 |
+
symlink $fname, $hash || warn "Can't symlink, $!";
|
| 249 |
+
} else {
|
| 250 |
+
print "copy $fname -> $hash\n" if $verbose;
|
| 251 |
+
copy_file($fname, $hash);
|
| 252 |
+
}
|
| 253 |
+
$hashlist{$hash} = $fprint;
|
| 254 |
+
}
|
git/usr/bin/captoinfo.exe
ADDED
|
Binary file (81.9 kB). View file
|
|
|
git/usr/bin/cat.exe
ADDED
|
Binary file (38.7 kB). View file
|
|
|