Skip to content
Snippets Groups Projects
Commit 07b54eba authored by nimrod's avatar nimrod
Browse files

- Added install script, updated documentation.

- Added test to install script, test also on OSX for a BSD userland.
parent 9f348ce4
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,6 @@
sha: v0.4.0
hooks:
- id: shell-lint
files: \.bashrc|\.githooks/post-merge|\.profile|Documents/Shore/cleanup/docker-.*|Documents/train-wifi\.sh
files: \.bashrc|\.githooks/post-merge|\.profile|Documents/Shore/cleanup/docker-.*|Documents/train-wifi\.sh|install
- id: shellcheck
files: \.bashrc|\.githooks/post-merge|\.profile|Documents/Shore/cleanup/docker-.*|Documents/train-wifi\.sh
files: \.bashrc|\.githooks/post-merge|\.profile|Documents/Shore/cleanup/docker-.*|Documents/train-wifi\.sh|install
---
language: python
python: "3.6"
matrix:
include:
- os: linux
dist: trusty
sudo: false
group: beta
language: python
python: 3.6
install:
- pip install pre_commit | cat
- os: osx
language: generic
install:
- brew install shellcheck
- pip install pre_commit | cat
cache:
- pip
- directories:
......@@ -16,11 +26,10 @@ addons:
packages:
- shellcheck
install:
- pip install pre_commit | cat
script:
- pre-commit run --all-files
- cd; $TRAVIS_BUILD_DIR/install
- git bull
notifications:
email: false
......@@ -18,18 +18,7 @@ WARNING: This will overwrite your existing files.
.. code:: shell
git clone https://www.shore.co.il/git/rcfiles
cd rcfiles
mv -f $(ls -A) $HOME/
cd ..
rm -r rcfiles
git submodule update --init --recursive
cd .githooks/
find -type f -exec ln -sf ../../.githooks/{} ../.git/hooks/ \;
cd ../
In older versions of Git the paths in the submodules are obsolete and thus need
to be corrected (before fetching them). The correction needs to be done in the
:code:`.git` and :code:`config` files inside each submodule.
rcfiles/install
License
-------
......
install 0 → 100755
#!/bin/sh
set -eu
case "$0" in
\.*)
git_root="$PWD/$(dirname "$0")";;
*)
git_root="$(dirname "$0")";;
esac
for file in $(git -C "$git_root" ls-files)
do
mkdir -p "$(dirname "$HOME/$file")"
mv -f "$git_root/$file" "$HOME/$file"
done
mv "$git_root/.git" "$HOME/"
cd
rm -r "$git_root"
find -name .git -type f -exec sed -i "s@$git_root@$HOME@g" {} \;
find -name config -type f -exec sed -i "s@$git_root@$HOME@g" {} \;
git submodule update --remote
cd .githooks
find -type f -exec ln -sf ../../.githooks/{} ../.git/hooks/ \;
cd ../
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment