Selaa lähdekoodia

removed the failed attempt at automatically compiling things

master
mort 9 vuotta sitten
vanhempi
commit
3bd7450b38
4 muutettua tiedostoa jossa 2 lisäystä ja 107 poistoa
  1. 0
    15
      install/i3wm.sh
  2. 0
    7
      install/mrec.sh
  3. 0
    3
      install/sxhkd.sh
  4. 2
    82
      setup.sh

+ 0
- 15
install/i3wm.sh Näytä tiedosto

@@ -1,15 +0,0 @@
case $OS in
ubuntu)
printf "%s\n" \
"Package: i3*" \
"Pin: origin \"build.i3wm.org\"" \
"Pin-Priority: 1001" \
| sudo tee /etc/apt/preferences.d/00-i3-autobuild.pref > /dev/null

sudo apt-get update
sudo apt-get install i3 -y
;;
*)
exit 1
;;
esac

+ 0
- 7
install/mrec.sh Näytä tiedosto

@@ -1,7 +0,0 @@
res=$(xdpyinfo | awk '/dimensions:/ { print $2; exit }')

rm "$HOME/.mrecrc"
echo "X=0" >> "$HOME/.mrecrc"
echo "Y=0" >> "$HOME/.mrecrc"
echo "W=$(echo $res | cut -d x -f 1)" >> "$HOME/.mrecrc"
echo "H=$(echo $res | cut -d x -f 2)" >> "$HOME/.mrecrc"

+ 0
- 3
install/sxhkd.sh Näytä tiedosto

@@ -1,3 +0,0 @@
git clone https://github.com/baskerville/sxhkd.git .
make
sudo make install

+ 2
- 82
setup.sh Näytä tiedosto

@@ -1,18 +1,5 @@
#!/bin/bash

export OS=$(awk '/DISTRIB_ID=/' /etc/*-release | sed 's/DISTRIB_ID=//' | tr '[:upper:]' '[:lower:]')

case $OS in
ubuntu)
;;
*)
echo "Unsupported OS: ${OS}."
exit 1
esac

rm out.log &>/dev/null
mkdir .installed &>/dev/null

issues=0

check_command()
@@ -32,63 +19,6 @@ check_file()
fi
}

check_dep()
{
dep=""

case $OS in
ubuntu)
case $1 in
xcb_keysym.h)
dep="libxcb-keysyms1-dev"
;;
xcb.h)
dep="libxcb-util0-dev"
;;
esac
;;
esac

exists=0
case $OS in
ubuntu)
dpkg -s "$dep" &> /dev/null
exists="$?"
;;
esac

if [ ! $exists ]; then
if [ "$dep" = "" ]; then
echo "Missing dependency: $1"
else
echo "Missing dependency: $dep"
fi
issues=1
fi
}

install_setup()
{
if [ -f ".installed/$1" ]; then
echo "$1 is already installed, skipping."
return
fi

echo "Installing ${1}..."
DIR=$(mktemp -d)
CDIR=$(pwd)
cd $DIR
echo "\n\nINSTALL: $1" >> "$CDIR/out.log"
sh "$CDIR/install/${1}.sh" &>> "$CDIR/out.log"
if [ ! $? ]; then
echo "An error occurred while installing ${1}. See out.log for more information."
else
touch "$CDIR/.installed/$1"
echo "Done."
fi
cd "$CDIR"
}

check_command "zsh"
check_command "tmux"
check_command "vim"
@@ -107,9 +37,6 @@ check_command "dunst"
check_command "curl"
check_command "sudo"

check_dep "xcb.h"
check_dep "xcb_keysym.h"

if [ $issues -ne 0 ]; then
echo "Some things are missing. Continue? (y/n)"
read response
@@ -129,6 +56,7 @@ cd ..
echo "Done."

echo "Copying config files..."
mkdir -p "$HOME/.config"
cd config
for f in *; do
rm -rf "$HOME/.config/$f"
@@ -152,26 +80,18 @@ rm -fr "$HOME/assets"
cp -r assets "$HOME/assets"
echo "Done."

while getopts :m:f option; do
while getopts :m option; do
case "$option" in
m)
echo "Not switching mod and alt keys."
echo "" > ~/.Xmodmaprc
;;
f)
echo "Forcing a recompile of packages."
rm .installed/*
;;
*)
echo "Unknown option: $option"
;;
esac
done

install_setup "sxhkd"
install_setup "i3wm"
install_setup "mrec"

if [ "$SHELL" != "/bin/zsh" ]; then
sudo chsh "$USER" -s /bin/zsh
fi

Loading…
Peruuta
Tallenna