mirror of https://github.com/sobolevn/git-secret
initial
commit
f988860966
@ -0,0 +1,19 @@
|
||||
# Check http://editorconfig.org for more information
|
||||
# This is the main config file for this project:
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
trim_trailing_whitespace = true
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
|
||||
[*.json]
|
||||
indent_size = 2
|
||||
|
||||
[*.py]
|
||||
indent_size = 4
|
||||
|
||||
[*.sh]
|
||||
indent_size = 2
|
@ -0,0 +1 @@
|
||||
* text=auto
|
@ -0,0 +1,117 @@
|
||||
#### joe made this: http://goel.io/joe
|
||||
|
||||
#####=== Windows ===#####
|
||||
# Windows image file caches
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
|
||||
# Folder config file
|
||||
Desktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Windows Installer files
|
||||
*.cab
|
||||
*.msi
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
#####=== Linux ===#####
|
||||
*~
|
||||
|
||||
# KDE directory preferences
|
||||
.directory
|
||||
|
||||
# Linux trash folder which might appear on any partition or disk
|
||||
.Trash-*
|
||||
|
||||
#####=== OSX ===#####
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear on external disk
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
#####=== JetBrains ===#####
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
|
||||
|
||||
*.iml
|
||||
|
||||
## Directory-based project format:
|
||||
.idea/
|
||||
# if you remove the above rule, at least ignore the following:
|
||||
|
||||
# User-specific stuff:
|
||||
# .idea/workspace.xml
|
||||
# .idea/tasks.xml
|
||||
# .idea/dictionaries
|
||||
|
||||
# Sensitive or high-churn files:
|
||||
# .idea/dataSources.ids
|
||||
# .idea/dataSources.xml
|
||||
# .idea/sqlDataSources.xml
|
||||
# .idea/dynamic.xml
|
||||
# .idea/uiDesigner.xml
|
||||
|
||||
# Gradle:
|
||||
# .idea/gradle.xml
|
||||
# .idea/libraries
|
||||
|
||||
# Mongo Explorer plugin:
|
||||
# .idea/mongoSettings.xml
|
||||
|
||||
## File-based project format:
|
||||
*.ipr
|
||||
*.iws
|
||||
|
||||
## Plugin-specific files:
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
|
||||
#####=== SublimeText ===#####
|
||||
# cache files for sublime text
|
||||
*.tmlanguage.cache
|
||||
*.tmPreferences.cache
|
||||
*.stTheme.cache
|
||||
|
||||
# workspace files are user-specific
|
||||
*.sublime-workspace
|
||||
|
||||
# project files should be checked into the repository, unless a significant
|
||||
# proportion of contributors will probably not be using SublimeText
|
||||
# *.sublime-project
|
||||
|
||||
# sftp configuration file
|
||||
sftp-config.json
|
||||
|
@ -0,0 +1,4 @@
|
||||
all: myscript
|
||||
|
||||
myscript: includes/* body/*
|
||||
cat $^ > "$@" || (rm -f "$@"; exit 1)
|
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
function _function_exists {
|
||||
declare -f -F $1 > /dev/null
|
||||
echo $?
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
function init {
|
||||
# A POSIX variable
|
||||
# Reset in case getopts has been used previously in the shell.
|
||||
OPTIND=1
|
||||
|
||||
output_file=""
|
||||
verbose=0
|
||||
|
||||
while getopts "h?vf:" opt; do
|
||||
case "$opt" in
|
||||
h|\?)
|
||||
usage
|
||||
;;
|
||||
v)
|
||||
verbose=1
|
||||
;;
|
||||
f)
|
||||
output_file=$OPTARG
|
||||
;;
|
||||
esac
|
||||
|
||||
shift $((OPTIND-1))
|
||||
|
||||
[ "$1" = "--" ] && shift
|
||||
done
|
||||
|
||||
echo "verbose=$verbose, output_file='$output_file', Leftovers: $@"
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
function usage {
|
||||
if [[ ! -z "$1" ]]; then
|
||||
echo $@
|
||||
fi
|
||||
|
||||
local commands=""
|
||||
local separator="|"
|
||||
|
||||
for com in `compgen -A function`
|
||||
do
|
||||
if [[ ! $com == _* ]]; then
|
||||
commands+="$com$separator"
|
||||
fi
|
||||
done
|
||||
|
||||
# usage|init|tell|hide|reveal
|
||||
echo "usage: git secret [${commands%?}]"
|
||||
exit 0
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
# encryption: https://www.gnupg.org/gph/en/manual.html#AEN111
|
||||
# git hooks: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
|
||||
# adding files to git on pre_commit hook:
|
||||
# http://stackoverflow.com/questions/3284292/can-a-git-hook-automatically-add-files-to-the-commit
|
||||
|
||||
SCRIPT_DIR=".secrets"
|
||||
|
||||
|
||||
function _check_setup {
|
||||
if [[ ! -d ".git" ]] || [[ ! -d ".git/hooks" ]]; then
|
||||
echo "repository is broken. try running 'git init' or 'git clone'"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
function _init_script {
|
||||
if [[ $# == 0 ]]; then
|
||||
usage "no input parameters provided."
|
||||
fi
|
||||
|
||||
# checking for proper set-up:
|
||||
_check_setup
|
||||
|
||||
# load dependencies:
|
||||
for f in ${0%/*}/bin/*; do [[ -f "$f" ]] && . "$f"; done
|
||||
|
||||
# routing the input command:
|
||||
if [[ `_function_exists $1` == 0 ]] && [[ ! $1 == _* ]]; then
|
||||
$1 "${@:2}"
|
||||
else
|
||||
usage "command ${1} not found."
|
||||
fi
|
||||
}
|
||||
|
||||
_init_script $@
|
Loading…
Reference in New Issue