Browse Source

improved install scripts

master
Robin Thoni 7 years ago
parent
commit
41d129a4ca
8 changed files with 86 additions and 26 deletions
  1. 12
    1
      bash/install
  2. 12
    1
      git/install
  3. 10
    10
      gnome-terminal/gnome-terminal/profiles/Default/%gconf.xml
  4. 10
    1
      gnome-terminal/install
  5. 13
    2
      i3/install
  6. 1
    2
      nma/install
  7. 0
    3
      nma/nma.conf
  8. 28
    6
      vim/install

+ 12
- 1
bash/install View File

@@ -1,6 +1,17 @@
1 1
 #! /usr/bin/env bash
2 2
 
3
+dir="$(dirname $(readlink -f "${0}"))"
4
+
3 5
 for file in bash_aliases bash_preexec bash_preexec_hooks bashrc git-prompt.sh nma_exclude
4 6
 do
5
-  ln -sf "$PWD"/$file ~/.$file
7
+  if [ -e ~/."${file}" ]
8
+  then
9
+    if [ -h ~/."${file}" ]
10
+    then
11
+      rm ~/."${file}"
12
+    else
13
+      mv ~/."${file}" ~/."${file}.old"
14
+    fi
15
+  fi
16
+  ln -s "${dir}/${file}" ~/."${file}"
6 17
 done

+ 12
- 1
git/install View File

@@ -1,6 +1,17 @@
1 1
 #! /usr/bin/env bash
2 2
 
3
+dir="$(dirname $(readlink -f "${0}"))"
4
+
3 5
 for file in gitconfig
4 6
 do
5
-  ln -sf "$PWD"/$file ~/.$file
7
+  if [ -e ~/."${file}" ]
8
+  then
9
+    if [ -h ~/."${file}" ]
10
+    then
11
+      rm ~/."${file}"
12
+    else
13
+      mv ~/."${file}" ~/."${file}.old"
14
+    fi
15
+  fi
16
+  ln -sf "${dir}/${file}" ~/."${file}"
6 17
 done

+ 10
- 10
gnome-terminal/gnome-terminal/profiles/Default/%gconf.xml View File

@@ -1,23 +1,23 @@
1 1
 <?xml version="1.0"?>
2 2
 <gconf>
3
-	<entry name="scrollback_unlimited" mtime="1478193313" type="bool" value="true"/>
4
-	<entry name="use_theme_colors" mtime="1478193313" type="bool" value="false"/>
5
-	<entry name="silent_bell" mtime="1478193313" type="bool" value="true"/>
6
-	<entry name="default_show_menubar" mtime="1478193313" type="bool" value="false"/>
7
-	<entry name="palette" mtime="1478193313" type="string">
3
+	<entry name="scrollback_unlimited" mtime="1478802656" type="bool" value="true"/>
4
+	<entry name="use_theme_colors" mtime="1478802656" type="bool" value="false"/>
5
+	<entry name="silent_bell" mtime="1478802656" type="bool" value="true"/>
6
+	<entry name="default_show_menubar" mtime="1478802656" type="bool" value="false"/>
7
+	<entry name="palette" mtime="1478802656" type="string">
8 8
 		<stringvalue>#2E2E34343636:#CCCC00000000:#4E4E9A9A0606:#C4C4A0A00000:#34346565A4A4:#757550507B7B:#060698209A9A:#D3D3D7D7CFCF:#555557575353:#EFEF29292929:#8A8AE2E23434:#FCFCE9E94F4F:#72729F9FCFCF:#ADAD7F7FA8A8:#3434E2E2E2E2:#EEEEEEEEECEC</stringvalue>
9 9
 	</entry>
10
-	<entry name="alternate_screen_scroll" mtime="1478193313" type="bool" value="true"/>
11
-	<entry name="background_color" mtime="1478193313" type="string">
10
+	<entry name="alternate_screen_scroll" mtime="1478802656" type="bool" value="true"/>
11
+	<entry name="background_color" mtime="1478802656" type="string">
12 12
 		<stringvalue>#2E2E34343636</stringvalue>
13 13
 	</entry>
14
-	<entry name="visible_name" mtime="1478193313" type="string">
14
+	<entry name="visible_name" mtime="1478802656" type="string">
15 15
 		<stringvalue>Default</stringvalue>
16 16
 	</entry>
17
-	<entry name="bold_color" mtime="1478193313" type="string">
17
+	<entry name="bold_color" mtime="1478802656" type="string">
18 18
 		<stringvalue>#000000000000</stringvalue>
19 19
 	</entry>
20
-	<entry name="foreground_color" mtime="1478193313" type="string">
20
+	<entry name="foreground_color" mtime="1478802656" type="string">
21 21
 		<stringvalue>#FFFFFFFFFFFF</stringvalue>
22 22
 	</entry>
23 23
 </gconf>

+ 10
- 1
gnome-terminal/install View File

@@ -1,3 +1,12 @@
1 1
 #! /usr/bin/env bash
2
-rm -rf ~/.gconf/apps/gnome-terminal
2
+
3
+if [ -e ~/.gconf/apps/gnome-terminal ]
4
+then
5
+  if [ -h ~/.gconf/apps/gnome-terminal ]
6
+  then
7
+    rm ~/.gconf/apps/gnome-terminal
8
+  else
9
+    mv ~/.gconf/apps/gnome-terminal ~/.gconf/apps/gnome-termnial.old
10
+  fi
11
+fi &&
3 12
 ln -sf "$PWD"/gnome-terminal ~/.gconf/apps/gnome-terminal

+ 13
- 2
i3/install View File

@@ -1,3 +1,14 @@
1 1
 #! /usr/bin/env bash
2
-rm -rf ~/.i3
3
-ln -sf "$PWD"/i3 ~/.i3
2
+
3
+dir="$(dirname $(readlink -f "${0}"))"
4
+
5
+if [ -e ~/.i3 ]
6
+then
7
+  if [ -h ~/.i3 ]
8
+  then
9
+    rm ~/.i3
10
+  else
11
+    mv ~/.i3 ~/.i3.old
12
+  fi
13
+fi &&
14
+ln -s "${dir}/i3" ~/.i3

+ 1
- 2
nma/install View File

@@ -1,4 +1,3 @@
1 1
 #! /usr/bin/env bash
2 2
 
3
-sudo cp nma /usr/local/bin
4
-cp nma.conf ~/.nma.conf
3
+cp nma /usr/local/bin

+ 0
- 3
nma/nma.conf View File

@@ -1,3 +0,0 @@
1
-#APIkey="0"
2
-#limit=5
3
-#pinghost="google.fr"

+ 28
- 6
vim/install View File

@@ -1,9 +1,31 @@
1 1
 #! /usr/bin/env bash
2 2
 
3
-ln -sf "$PWD"/vim ~/.vim
4
-ln -sf "$PWD"/vimrc ~/.vimrc
3
+dir="$(dirname $(readlink -f "${0}"))"
5 4
 
6
-cd ..
7
-git submodule init
8
-git submodule update
9
-cd vim
5
+if [ -e ~/.vim ]
6
+then
7
+  if [ -h ~/.vim ]
8
+  then
9
+    rm ~/.vim
10
+  else
11
+    mv ~/.vim ~/.vim.old
12
+  fi
13
+fi &&
14
+ln -sf "${dir}/vim" ~/.vim &&
15
+
16
+if [ -e ~/.vimrc ]
17
+then
18
+  if [ -h ~/.vimrc ]
19
+  then
20
+    rm ~/.vimrc
21
+  else
22
+    mv ~/.vimrc ~/.vimrc.old
23
+  fi
24
+fi &&
25
+ln -sf "${dir}/vimrc" ~/.vimrc &&
26
+
27
+(
28
+  cd "${dir}" &&
29
+  git submodule init &&
30
+  git submodule update
31
+)

Loading…
Cancel
Save