Skip to content

Commit

Permalink
remove comments sep
Browse files Browse the repository at this point in the history
  • Loading branch information
alanlivio committed Nov 15, 2023
1 parent 6f2504e commit 78599f0
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 37 deletions.
6 changes: 0 additions & 6 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@

BH_DIR="$(dirname "${BASH_SOURCE[0]}")"

#########################
# load os_any.bash
#########################

source "$BH_DIR/os_any.bash"

#########################
# load any os_<name>.bash files
#########################

if [[ $OSTYPE == msys* || -n $WSL_DISTRO_NAME ]]; then
source "$BH_DIR/os_win.bash"
Expand All @@ -24,9 +20,7 @@ if [[ $OSTYPE == darwin* ]]; then
"$BH_DIR/os_mac.bash"
fi

#########################
# load <command>.bash files
#########################

for file in "$BH_DIR/commands/"*.bash; do
command_name=$(basename ${file%.*})
Expand Down
14 changes: 0 additions & 14 deletions os_any.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#########################
# load scripts as alias
#########################

for file in "$BH_DIR/scripts/"*.sh; do
if test -f $file; then
Expand All @@ -9,9 +7,7 @@ for file in "$BH_DIR/scripts/"*.sh; do
fi
done

#########################
# basic
#########################

alias return_if_last_command_fail='if [ $? != 0 ]; then log_error ${FUNCNAME[0]} fail; return 1; fi'
alias bashrc_reload='source $HOME/.bashrc'
Expand All @@ -29,9 +25,7 @@ function test_and_create_dir() {
fi
}

#########################
# dotfiles
#########################

function _dotfiles_func() {
: ${1?"Usage: ${FUNCNAME[0]} <backup|install|diff>"}
Expand All @@ -56,17 +50,13 @@ alias dotfiles_install="_dotfiles_func install"
alias dotfiles_backup="_dotfiles_func backup"
alias dotfiles_diff="_dotfiles_func diff"

#########################
# clean
#########################

function latex_clean() {
rm -rf comment.cut ./*.aux ./*.dbx ./*.bbx ./*.cbx ./*.dvi ./*.log ./*.lox ./*.out ./*.lol ./*.pdf ./*.synctex.gz ./_minted-* ./*.bbl ./*.blg ./*.lot ./*.lof ./*.toc ./*.lol ./*.fdb_latexmk ./*.fls ./*.bcf ./*.aux ./*.fls ./*.fdb_latexmk ./*.log
}

#########################
# arp
#########################

function arp_list() {
if [[ $OSTYPE == "msys"* ]]; then
Expand All @@ -76,9 +66,7 @@ function arp_list() {
fi
}

#########################
# decompress/folder/user
#########################

function decompress() {
: ${1?"Usage: ${FUNCNAME[0]} <zip-name> [dir-name]"}
Expand Down Expand Up @@ -113,9 +101,7 @@ function decompress_from_url() {
decompress $file_name $2
}

#########################
# ssh
#########################

function ssh_fix_permissions() {
chmod 700 $HOME/.ssh/
Expand Down
10 changes: 0 additions & 10 deletions os_ubu.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#########################
# basic
#########################

alias linux_product_name='sudo dmidecode -s system-product-name'
alias linux_list_gpu="lspci -nn | grep -E 'VGA|Display'"
Expand All @@ -24,9 +22,7 @@ function ubu_update() {
sudo apt -y autoremove
}

#########################
# apt
#########################

alias apt_ppa_remove="sudo add-apt-repository --remove"
alias apt_ppa_list="apt policy"
Expand All @@ -41,9 +37,7 @@ function apt_fixes() {
}
alias apt_list_avaliable_java="aptitude search '?provides(java-runtime)'"

#########################
# deb
#########################

alias deb_info_file='dpkg-deb --info'
alias deb_contents_file='dpkg-deb --show'
Expand All @@ -60,15 +54,11 @@ function deb_install_file_from_url() {
sudo dpkg -i /tmp/$deb_name
}

#########################
# snap
#########################

alias snap_hide_home_folder='sudo snap set system experimental.hidden-snap-folder=true'

#########################
# others
#########################

function ubu_install_wsl_cuda_11() {
# https://ubuntu.com/tutorials/enabling-gpu-acceleration-on-ubuntu-on-wsl2-with-the-nvidia-cuda-platform#3-install-nvidia-cuda-on-ubuntu
Expand Down
8 changes: 1 addition & 7 deletions os_win.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#########################
# essential aliases
#########################

alias powershell='powershell.exe'
alias explorer='explorer.exe'
Expand All @@ -15,9 +13,7 @@ else
alias winpath='cygpath -m'
fi

#########################
# load scripts as aliases
#########################
# load os_win.ps1 funcs as aliases

for file in "$BH_DIR/scripts/"win_*.ps1; do
if test -f $file; then
Expand All @@ -39,9 +35,7 @@ if type pacman &>/dev/null; then
alias msys2_use_same_home='echo db_home: windows >>/etc/nsswitch.conf'
fi

#########################
# win
#########################

function _winget_install() {
local pkgs_to_install=""
Expand Down

0 comments on commit 78599f0

Please sign in to comment.