Compare commits

..

2 Commits

Author SHA1 Message Date
54baed66d2 Fixed local script handling 2025-04-21 21:31:41 -07:00
Autumn Naber
67d73a4c71 Added some convenience scripts 2024-03-14 14:44:27 -07:00
4 changed files with 35 additions and 2 deletions

View File

@@ -14,4 +14,6 @@ unset SSH_ASKPASS
[ -e "$DIR_COLORS" ] || DIR_COLORS=""
eval "`dircolors -b $DIR_COLORS`"
export PATH=$PATH:$HOME/.local/bin
#### END MAGIC VALUE: AZSQFRB8

20
gentags Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
CSCOPE_DIR="$PWD/cscope"
if [ ! -d "$CSCOPE_DIR" ]; then
mkdir "$CSCOPE_DIR"
fi
echo "Finding files ..."
find "$PWD" -type d \( -name regs -o -name reg \) -prune \
-o -name '*.[ch]' \
-o -name '*.cpp' \
-o -name '*.cc' \
-o -name '*.hpp' > "$CSCOPE_DIR/cscope.files"
echo "Adding files to cscope db: $PWD/cscope.db ..."
cscope -b -i "$CSCOPE_DIR/cscope.files"
export CSCOPE_DB="$PWD/cscope.out"
echo "Exported CSCOPE_DB to: '$CSCOPE_DB'"

View File

@@ -18,11 +18,18 @@ git submodule init
git submodule update --recursive
echo "Copying configs"
copy_list=(ctags dircolors gitconfig inputrc tmux.conf vim vimrc Xdefaults)
for config in ${copy_list[@]}; do
config_copy_list=(ctags dircolors gitconfig inputrc tmux.conf vim vimrc Xdefaults)
for config in ${config_copy_list[@]}; do
cp -fr "$config" $HOME/."$config"
done
echo "Copying scripts"
mkdir -p "${HOME}/.local/bin"
script_copy_list=(update-dns.sh gentags)
for script in ${script_copy_list[@]}; do
cp -fr "${script}" "${HOME}/.local/bin/${script}"
done
echo "=========================================================="
echo "= Be sure to adjust the Git user/email as necessary!!!!! ="
echo "=========================================================="

4
update-dns.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/bash
dns=$(nslookup.exe www.google.com 2>&1 | grep "Address:" | awk '{print $2}' | tr -d '\r')
printf "nameserver %s\n" "$dns" | tee /etc/resolv.conf