.profile.roku.dev and etc

This commit is contained in:
2023-01-25 14:00:18 +00:00
parent 875b05dfdb
commit 4ff39435b9
4 changed files with 168 additions and 30 deletions

32
install.sh Executable file
View File

@@ -0,0 +1,32 @@
#!/bin/sh
#
# Make sure that .profile loads all .profile.* files.
#
[ ! -f ${HOME}/.profile ] && touch ${HOME}/.profile
grep "# Load .profile.* files." ${HOME}/.profile
if [ $? != 0 ]; then
cat >> ${HOME}/.profile << EOF
# Load .profile.* files.
for profile in \${HOME}/.profile.*; do
[ -f \${profile} ] && source \${profile}
done
EOF
fi
#
# Make sure that .profile file is loaded from bashrc.
#
grep .profile ${HOME}/.bashrc
if [ $? != 0 ]; then
printf "# Load .profile in case its an ssh(non interactive) shell.\n"
printf "[ -f ~/.profile ] && source ~/.profile\n" >> ${HOME}/.bashrc
fi
#
# Create symlinks to all .profile.* files.
#
find $(pwd) -maxdepth 1 -name .profile.\* -type f -exec ln -i -s \{\} ${HOME} \;