Move to gnu/stow
This commit is contained in:
parent
4b1fda2809
commit
c9d482f576
3 changed files with 67 additions and 8 deletions
24
git/.gitconfig
Normal file
24
git/.gitconfig
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
[user]
|
||||||
|
|
||||||
|
name = "Hactarus"
|
||||||
|
email = Hactarus@users.noreply.github.com
|
||||||
|
|
||||||
|
|
||||||
|
[alias]
|
||||||
|
pushdev = !git push --set-upstream origin "`git branch --no-color 2>/dev/null | grep '*' | sed -e 's/\\* //'`:dev/hactarus/`git branch --no-color 2>/dev/null | grep '*' | sed -e 's/\\* //'`"
|
||||||
|
graph = !git log --oneline --graph --abbrev-commit --decorate --date=relative --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)\n'
|
||||||
|
|
||||||
|
[push]
|
||||||
|
default = simple
|
||||||
|
|
||||||
|
[init]
|
||||||
|
defaultBranch = main
|
||||||
|
|
||||||
|
[url "ssh://git@gitlab.com"]
|
||||||
|
insteadOf = "https://www.gitlab.com"
|
||||||
|
|
||||||
|
[url "ssh://git@github.com"]
|
||||||
|
insteadOf = "https://www.github.com"
|
||||||
|
|
||||||
|
[includeIf "gitdir:~/work"]
|
||||||
|
path = .gitconfig-work
|
8
init
8
init
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
locale -a | grep -i "utf8" 2>&1 > /dev/null
|
|
||||||
if [[ ! $? -eq 0 ]]; then
|
|
||||||
echo -e "\033[31;1mPlease install utf8 locale\033[0m"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
_RDIR=$(cd `dirname $0` && pwd)
|
|
||||||
${_RDIR}/bin/homemaker.amd64 -variant $@ ${_RDIR}/common.toml ${_RDIR}
|
|
43
setup.sh
Executable file
43
setup.sh
Executable file
|
@ -0,0 +1,43 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# make sure we have pulled in and updated any submodules
|
||||||
|
git submodule init
|
||||||
|
git submodule update
|
||||||
|
|
||||||
|
# what directories should be installable by all users including the root user
|
||||||
|
base=(
|
||||||
|
bash
|
||||||
|
)
|
||||||
|
|
||||||
|
# folders that should, or only need to be installed for a local user
|
||||||
|
useronly=(
|
||||||
|
git
|
||||||
|
)
|
||||||
|
|
||||||
|
# run the stow command for the passed in directory ($2) in location $1
|
||||||
|
stowit() {
|
||||||
|
usr=$1
|
||||||
|
app=$2
|
||||||
|
# -v verbose
|
||||||
|
# -R recursive
|
||||||
|
# -t target
|
||||||
|
stow -v -R -t ${usr} ${app}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Stowing apps for user: ${whoami}"
|
||||||
|
|
||||||
|
# install apps available to local users and root
|
||||||
|
for app in ${base[@]}; do
|
||||||
|
stowit "${HOME}" $app
|
||||||
|
done
|
||||||
|
|
||||||
|
# install only user space folders
|
||||||
|
for app in ${useronly[@]}; do
|
||||||
|
if [[! "$(whoami)" = *"root"*]]; then
|
||||||
|
stowit "${HOME}" $app
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "##### ALL DONE"
|
Loading…
Add table
Reference in a new issue