dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit 72b66a9a877db6eba02b915258c84435e6c9ac72
parent f760d3e97828619b3fabb0996dbd88bc037f4339
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Sun, 31 Dec 2017 19:18:12 -0500

Add my-perms

Diffstat:
A.local/bin/my-perms | 31+++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+), 0 deletions(-)

diff --git a/.local/bin/my-perms b/.local/bin/my-perms @@ -0,0 +1,31 @@ +#!/bin/bash + +# +# ~/.local/bin/my-perms +# +# This file operates on $HOME, seting permissions for all dotfiles and +# dot-directories. The $HOME folder itself also has its permissions set +# to a secure default. +# + +cd $HOME + +for rec in $(ls -A) +do + case $rec in + .*) + if [[ -f "$rec" ]] + then + chmod 600 $rec + fi + + if [[ -d "$rec" ]] + then + chmod 700 $rec + fi + ;; + esac +done + +# Finally, set the permissions for $HOME itself +chmod 700 .