Added some convenience scripts
This commit is contained in:
20
gentags
Executable file
20
gentags
Executable 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'"
|
||||
10
setup.sh
10
setup.sh
@@ -18,11 +18,17 @@ 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"
|
||||
script_copy_list=(update-dns.sh gentags)
|
||||
for script in ${script_copy_list[@]}; do
|
||||
cp -fr "script" /usr/local/bin/$script
|
||||
done
|
||||
|
||||
echo "=========================================================="
|
||||
echo "= Be sure to adjust the Git user/email as necessary!!!!! ="
|
||||
echo "=========================================================="
|
||||
|
||||
4
update-dns.sh
Executable file
4
update-dns.sh
Executable 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
|
||||
Reference in New Issue
Block a user