From b23942399870baeae376c6c9c59defd99c0e9d53 Mon Sep 17 00:00:00 2001 From: Raghuram Subramani Date: Fri, 6 Dec 2024 20:45:18 +0530 Subject: move to scripts/ --- build.sh | 3 --- diff.py | 18 ------------------ get_paths.sh | 3 --- provision.sh | 31 ------------------------------- run.sh | 10 ---------- scripts/build.sh | 3 +++ scripts/diff.py | 20 ++++++++++++++++++++ scripts/get_paths.sh | 3 +++ scripts/provision.sh | 31 +++++++++++++++++++++++++++++++ scripts/run.sh | 10 ++++++++++ 10 files changed, 67 insertions(+), 65 deletions(-) delete mode 100755 build.sh delete mode 100644 diff.py delete mode 100755 get_paths.sh delete mode 100644 provision.sh delete mode 100755 run.sh create mode 100755 scripts/build.sh create mode 100755 scripts/diff.py create mode 100755 scripts/get_paths.sh create mode 100644 scripts/provision.sh create mode 100755 scripts/run.sh diff --git a/build.sh b/build.sh deleted file mode 100755 index 457c5db..0000000 --- a/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -docker build -t lineage . diff --git a/diff.py b/diff.py deleted file mode 100644 index 226248f..0000000 --- a/diff.py +++ /dev/null @@ -1,18 +0,0 @@ -import sys - -if len(sys.argv) != 3: - print(f'Usage: {sys.argv[0]} ONE TWO') - -one = open(sys.argv[1]).read().split('\n') -two = open(sys.argv[2]).read().split('\n') - -print(f'{sys.argv[2]} doesn\'t contain:\n') -for i in one: - if i not in two: - print(i) - -print('\n\n\n') -print(f'{sys.argv[1]} doesn\'t contain:\n') -for i in two: - if i not in one: - print(i) diff --git a/get_paths.sh b/get_paths.sh deleted file mode 100755 index b62cefc..0000000 --- a/get_paths.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -cat $1 | grep "" -A install -. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" - -git clone https://github.com/compromyse/dotfiles $HOME/.config/home-manager/dotfiles -git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm - -rm $HOME/.config/home-manager/home.nix -ln -s $HOME/.config/home-manager/dotfiles/machines/$CONFIG/home.nix $HOME/.config/home-manager/home.nix - -sudo apt-get purge -y git -sudo apt-get autoremove -y - -home-manager build -home-manager switch -b backup - -rm $HOME/result - -~/.tmux/plugins/tpm/bin/install_plugins diff --git a/run.sh b/run.sh deleted file mode 100755 index e700759..0000000 --- a/run.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -if [ -z "$1" ]; then - echo "Usage: $0 [directory]" - exit -fi - -user=compromyse - -docker run -it --rm -v "$(pwd)/$1:/home/$user/src" -v "$HOME/.ssh:/home/$user/.ssh" lineage diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100755 index 0000000..457c5db --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +docker build -t lineage . diff --git a/scripts/diff.py b/scripts/diff.py new file mode 100755 index 0000000..349406d --- /dev/null +++ b/scripts/diff.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python3 + +import sys + +if len(sys.argv) != 3: + print(f'Usage: {sys.argv[0]} ONE TWO') + +one = open(sys.argv[1]).read().split('\n') +two = open(sys.argv[2]).read().split('\n') + +print(f'{sys.argv[2]} doesn\'t contain:\n') +for i in one: + if i not in two: + print(i) + +print('\n\n\n') +print(f'{sys.argv[1]} doesn\'t contain:\n') +for i in two: + if i not in one: + print(i) diff --git a/scripts/get_paths.sh b/scripts/get_paths.sh new file mode 100755 index 0000000..b62cefc --- /dev/null +++ b/scripts/get_paths.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +cat $1 | grep "" -A install +. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" + +git clone https://github.com/compromyse/dotfiles $HOME/.config/home-manager/dotfiles +git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm + +rm $HOME/.config/home-manager/home.nix +ln -s $HOME/.config/home-manager/dotfiles/machines/$CONFIG/home.nix $HOME/.config/home-manager/home.nix + +sudo apt-get purge -y git +sudo apt-get autoremove -y + +home-manager build +home-manager switch -b backup + +rm $HOME/result + +~/.tmux/plugins/tpm/bin/install_plugins diff --git a/scripts/run.sh b/scripts/run.sh new file mode 100755 index 0000000..e700759 --- /dev/null +++ b/scripts/run.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +if [ -z "$1" ]; then + echo "Usage: $0 [directory]" + exit +fi + +user=compromyse + +docker run -it --rm -v "$(pwd)/$1:/home/$user/src" -v "$HOME/.ssh:/home/$user/.ssh" lineage -- cgit v1.2.3