setup-kapelu 3.2.5 → 3.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/install.sh +16 -6
  2. package/package.json +1 -1
package/install.sh CHANGED
@@ -15,10 +15,9 @@ HOME_DIR=$HOME
15
15
  DESKTOP_DIR=$(xdg-user-dir DESKTOP)
16
16
  TMP_DIR="/tmp/kape-setup-$RANDOM"
17
17
  REPO="https://github.com/Kapelu/kape-setup.git"
18
- LOG_FILE="$HOME_DIR/setup-kape.log"
19
18
  green='\e[32m'
20
19
  reset='\e[0m'
21
- LOG="$HOME/post-install.log"
20
+ LOG="$HOME/setup-kapelu.log"
22
21
 
23
22
  log() {
24
23
  echo -e "\033[0;32m✅ $1\033[0m"
@@ -53,6 +52,16 @@ check_git(){
53
52
  fi
54
53
  }
55
54
 
55
+ permits(){
56
+ while IFS= read -r -d '' file
57
+ do
58
+ if head -n1 "$file" | grep -q "^#!"
59
+ then
60
+ chmod +x "$file"
61
+ fi
62
+ done < <(find . -type f -print0)
63
+ }
64
+
56
65
  backup_bashrc(){
57
66
 
58
67
  if [ -f "$HOME_DIR/.bashrc" ]; then
@@ -70,11 +79,12 @@ clone_repo(){
70
79
 
71
80
  copy_scripts(){
72
81
 
73
- mkdir -p "$HOME_DIR/script"
82
+ mkdir -p "$HOME_DIR/script"
74
83
 
75
- cp "$TMP_DIR/script/"* "$HOME_DIR/script/"
84
+ cp -r "$TMP_DIR/script/." "$HOME_DIR/script/"
85
+
86
+ find "$HOME_DIR/script" -type f -name "*.sh" -exec chmod +x {} \;
76
87
 
77
- chmod +x "$HOME_DIR/script/"*
78
88
  }
79
89
 
80
90
  copy_config(){
@@ -135,7 +145,7 @@ run_setup(){
135
145
 
136
146
  printf "${green}📦 ¿Desea ejecutar setup.sh? (s/n): ${reset}"
137
147
  read RESP
138
-
148
+ chmod +x setup.sh
139
149
 
140
150
  if [ "$RESP" = "s" ]; then
141
151
  bash "$HOME_DIR/script/setup.sh"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "setup-kapelu",
3
- "version": "3.2.5",
3
+ "version": "3.2.7",
4
4
  "description": "Script post-install de Ubuntu",
5
5
  "type": "commonjs",
6
6
  "bin": {