mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2024-12-22 12:17:42 +00:00
Update packages to install once and add python packages for ubuntu
This commit is contained in:
parent
ef3c3d5514
commit
26ccbb8594
11
assets/default/bin/bak
Executable file
11
assets/default/bin/bak
Executable file
@ -0,0 +1,11 @@
|
||||
#! /bin/bash
|
||||
|
||||
f="$1"
|
||||
ext="${f##*.}"
|
||||
|
||||
if [[ "$ext" == "bak" ]]; then
|
||||
cp $f "${f%.*}"
|
||||
else
|
||||
cp "$f" "${f}.bak"
|
||||
fi
|
||||
|
46
assets/default/bin/nnotes
Executable file
46
assets/default/bin/nnotes
Executable file
@ -0,0 +1,46 @@
|
||||
#! /bin/bash
|
||||
|
||||
NOTES_DIR="$HOME/Nextcloud/Notes"
|
||||
|
||||
function usage() {
|
||||
echo "nnotes expects 0, 1, or 2 arguments"
|
||||
}
|
||||
|
||||
function validate() {
|
||||
if [ ! -d "$NOTES_DIR" ]; then
|
||||
echo "No directory $NOTES_DIR. Please sync your notes"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function main() {
|
||||
validate
|
||||
|
||||
# nvim "$NOTES_DIR" -c ":cd $NOTES_DIR"
|
||||
cd $NOTES_DIR
|
||||
|
||||
mkdir -p $CATEGORY
|
||||
nvim $CATEGORY/$FILE.md
|
||||
}
|
||||
|
||||
case $# in
|
||||
0)
|
||||
CATEGORY=.
|
||||
FILE=.
|
||||
;;
|
||||
1)
|
||||
CATEGORY=.
|
||||
FILE="$1"
|
||||
;;
|
||||
2)
|
||||
CATEGORY="$1"
|
||||
FILE="$2"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown number of arugments"
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
main $*
|
7
assets/default/mac-bin/cal_now
Executable file
7
assets/default/mac-bin/cal_now
Executable file
@ -0,0 +1,7 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Prints out whatever calendar event is on right now
|
||||
|
||||
cal_name=ifij@yelp.com
|
||||
|
||||
icalBuddy -li 1 -nc -ea -ic $cal_name -b '' eventsNow | head -n 1 | sed 's/^/ /' | sed 's/$/ |/'
|
9
assets/default/mac-bin/dark_mode
Executable file
9
assets/default/mac-bin/dark_mode
Executable file
@ -0,0 +1,9 @@
|
||||
#! /bin/sh
|
||||
|
||||
osascript <<EOF
|
||||
tell application "System Events"
|
||||
tell appearance preferences
|
||||
set dark mode to true
|
||||
end tell
|
||||
end tell
|
||||
EOF
|
BIN
assets/default/mac-bin/icalBuddy
Executable file
BIN
assets/default/mac-bin/icalBuddy
Executable file
Binary file not shown.
9
assets/default/mac-bin/light_mode
Executable file
9
assets/default/mac-bin/light_mode
Executable file
@ -0,0 +1,9 @@
|
||||
#! /bin/sh
|
||||
|
||||
osascript <<EOF
|
||||
tell application "System Events"
|
||||
tell appearance preferences
|
||||
set dark mode to false
|
||||
end tell
|
||||
end tell
|
||||
EOF
|
9
assets/default/mac-bin/toggle_dark_mode
Executable file
9
assets/default/mac-bin/toggle_dark_mode
Executable file
@ -0,0 +1,9 @@
|
||||
#! /bin/sh
|
||||
|
||||
osascript <<EOF
|
||||
tell application "System Events"
|
||||
tell appearance preferences
|
||||
set dark mode to not dark mode
|
||||
end tell
|
||||
end tell
|
||||
EOF
|
@ -49,6 +49,9 @@ fi
|
||||
|
||||
recipe 'dotfiles'
|
||||
recipe 'bin'
|
||||
if [ "$(uname)" == 'Darwin' ]; then
|
||||
recipe 'mac-bin'
|
||||
fi
|
||||
recipe 'git'
|
||||
recipe 'vim-settings'
|
||||
recipe 'fish'
|
||||
|
6
recipes/default/mac-bin
Normal file
6
recipes/default/mac-bin
Normal file
@ -0,0 +1,6 @@
|
||||
#! /bin/bash
|
||||
|
||||
for f in $DEFAULT_ASSETS_PATH/* ; do
|
||||
try_link "$f" "$USER_BIN/$(basename $f)"
|
||||
done
|
||||
|
47
recipes/default/packages
Normal file → Executable file
47
recipes/default/packages
Normal file → Executable file
@ -1,7 +1,7 @@
|
||||
#! /bin/bash
|
||||
|
||||
sudo_package_update
|
||||
sudo_package 'tmux htop curl wget mercurial ctags tig pv jq fish mosh bash-completion doxygen'
|
||||
packages="tmux htop curl wget mercurial ctags tig pv jq fish mosh bash-completion doxygen"
|
||||
|
||||
# This now installs a lot of language specific stuff from python, gradle, and go, to rust.
|
||||
# Should consider pulling these into different recipes that are dependent on the environment
|
||||
@ -11,12 +11,25 @@ sudo_package 'tmux htop curl wget mercurial ctags tig pv jq fish mosh bash-compl
|
||||
case "$PACKAGE_MANAGER" in
|
||||
"port")
|
||||
# Non-standard packages
|
||||
sudo_package 'the_silver_searcher md5sha1sum gradle go bash apache-ant'
|
||||
packages="$packages the_silver_searcher md5sha1sum gradle go bash apache-ant"
|
||||
# Rust
|
||||
sudo_package'rust cargo'
|
||||
packages="$packages rust cargo"
|
||||
# Python packages
|
||||
sudo_package 'python27 py27-ipython py27-pip py27-six py27-tox py27-flake8 py27-virtualenv'
|
||||
sudo_package 'python37 py37-ipython py37-pip py37-six py37-tox py37-flake8 py37-virtualenv'
|
||||
packages="$packages python27 py27-ipython py27-pip py27-six py27-tox py27-flake8 py27-virtualenv"
|
||||
packages="$packages python37 py37-ipython py37-pip py37-six py37-tox py37-flake8 py37-virtualenv"
|
||||
# Macvim with ruby and python support
|
||||
# sudo_package 'macvim +ruby +python27'
|
||||
# Vim with ruby and python support
|
||||
packages="$packages vim +ruby +python27 +python37"
|
||||
# Newer version of git with completion
|
||||
packages="$packages git +bash_completion"
|
||||
# Neovim with python plugins
|
||||
packages="$packages neovim py-neovim py27-neovim py37-neovim"
|
||||
|
||||
# Install packages
|
||||
sudo_package $packages
|
||||
|
||||
# Select defaults
|
||||
sudo port select --set python python27
|
||||
sudo port select --set python2 python27
|
||||
sudo port select --set python3 python37
|
||||
@ -27,21 +40,23 @@ case "$PACKAGE_MANAGER" in
|
||||
sudo port select --set tox tox27
|
||||
sudo port select --set flake8 flake8-27
|
||||
sudo port select --set virtualenv virtualenv27
|
||||
# Macvim with ruby and python support
|
||||
# sudo_package 'macvim +ruby +python27'
|
||||
# Vim with ruby and python support
|
||||
sudo_package 'vim +ruby +python27'
|
||||
# Newer version of git with completion
|
||||
sudo_package 'git +bash_completion'
|
||||
# Neovim with python plugins
|
||||
sudo_package 'neovim py-neovim py27-neovim py37-neovim'
|
||||
try_link $(which pip-3.7) "$USER_BIN/pip3"
|
||||
;;
|
||||
"apt-get")
|
||||
if [ -n "$(apt-cache policy silversearcher-ag)" ] ; then
|
||||
sudo_package 'silversearcher-ag'
|
||||
packages="$packages silversearcher-ag"
|
||||
fi
|
||||
sudo_package 'build-essential vim golang-go'
|
||||
packages="$packages build-essential vim golang-go"
|
||||
# Neovim with python plugins
|
||||
packages="$packages neovim python-neovim python3-neovim"
|
||||
# Python packages
|
||||
packages="$packages python python-ipython python-pip python-six python-tox python-flake8 python-virtualenv"
|
||||
packages="$packages python3 python3-ipython python3-pip python3-six python3-flake8 python3-virtualenv python3-venv"
|
||||
# No python3-tox for ubuntu
|
||||
sudo pip3 install tox
|
||||
# Rust
|
||||
sudo_package 'rustc cargo'
|
||||
packages="$packages rustc cargo"
|
||||
|
||||
sudo_package $packages
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user