File tree Expand file tree Collapse file tree 6 files changed +35
-35
lines changed Expand file tree Collapse file tree 6 files changed +35
-35
lines changed Original file line number Diff line number Diff line change @@ -33,5 +33,5 @@ do-global-add() {
33
33
util.text_add_dependency " $BASALT_GLOBAL_DATA_DIR /global/dependencies" " $url @$version "
34
34
done
35
35
36
- pkg. do-global-install
36
+ do-global-install
37
37
}
Original file line number Diff line number Diff line change
1
+ # shellcheck shell=bash
2
+
3
+ do-global-install () {
4
+ util.init_global
5
+
6
+ if (( $# != 0 )) ; then
7
+ newindent.die " No arguments or flags must be specified"
8
+ fi
9
+
10
+ # TODO: this should be changed when we make global location dot_basalt
11
+ if ! rm -rf " $BASALT_GLOBAL_DATA_DIR /global/.basalt" ; then
12
+ print.indent-die " Could not remove global '.basalt' directory"
13
+ fi
14
+
15
+ local -a deps=()
16
+ local dep=
17
+ while IFS= read -r dep; do
18
+ if [ -z " $dep " ]; then
19
+ continue
20
+ fi
21
+
22
+ deps+=(" $dep " )
23
+ done < " $BASALT_GLOBAL_DATA_DIR /global/dependencies" ; unset dep
24
+
25
+ pkg.install_package " $BASALT_GLOBAL_DATA_DIR /global" ' lenient' " ${deps[@]} "
26
+ }
Original file line number Diff line number Diff line change @@ -32,5 +32,5 @@ do-global-remove() {
32
32
util.text_remove_dependency " $BASALT_GLOBAL_DATA_DIR /global/dependencies" " $url " " $flag_force "
33
33
done
34
34
35
- pkg. do-global-install
35
+ do-global-install
36
36
}
Original file line number Diff line number Diff line change 3
3
do-install () {
4
4
util.init_local
5
5
6
- for arg; do case " $arg " in
7
- -* )
8
- print.die " Flag '$arg ' not recognized"
9
- ;;
10
- esac done
6
+ if (( $# != 0 )) ; then
7
+ newindent.die " No arguments or flags must be specified"
8
+ fi
11
9
12
- # Everything in the local ./.basalt is a symlink to some file or directory
13
- # stored globally (per-user). Thus, we can just remove it since it won't take long
14
- # to re-symlink. Additionally, this will provide auto package pruning
15
10
if ! rm -rf " $BASALT_LOCAL_PROJECT_DIR /.basalt" ; then
16
11
print.die " Could not remove local '.basalt' directory"
17
12
fi
Original file line number Diff line number Diff line change 1
1
# shellcheck shell=bash
2
2
3
- # @description This fufills the function of a 'basalt global install'
4
- # command. Since that's not a real command, it does not have its own
5
- # file in 'commands'; it's here instead
6
- pkg.do-global-install () {
7
- if ! rm -rf " $BASALT_GLOBAL_DATA_DIR /global/.basalt" ; then
8
- print.indent-die " Could not remove global '.basalt' directory"
9
- fi
10
-
11
- local -a deps=()
12
- local dep=
13
-
14
- while IFS= read -r dep; do
15
- if [ -z " $dep " ]; then
16
- continue
17
- fi
18
-
19
- deps+=(" $dep " )
20
- done < " $BASALT_GLOBAL_DATA_DIR /global/dependencies" ; unset dep
21
-
22
- pkg.install_package " $BASALT_GLOBAL_DATA_DIR /global" ' lenient' " ${deps[@]} "
23
- }
24
-
25
3
# @description Installs a pacakge and all its dependencies, relative to a
26
4
# particular project_dir. symlink_mode changes how components of its direct
27
5
# dependencies are synced
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ util.init_global() {
34
34
print.die " Either 'BASALT_GLOBAL_REPO' or 'BASALT_GLOBAL_DATA_DIR' is empty. Did you forget to run add 'basalt init <shell>' in your shell configuration?"
35
35
fi
36
36
37
+ # TODO
37
38
[ -d " $BASALT_GLOBAL_REPO " ] || mkdir -p " $BASALT_GLOBAL_REPO "
38
39
[ -d " $BASALT_GLOBAL_DATA_DIR /global" ] || mkdir -p " $BASALT_GLOBAL_DATA_DIR /global"
39
40
[ -d " $BASALT_GLOBAL_DATA_DIR /store" ] || mkdir -p " $BASALT_GLOBAL_DATA_DIR /store"
@@ -352,12 +353,12 @@ Global subcommands:
352
353
add <package>
353
354
Installs a global package
354
355
355
- upgrade <package>
356
- Upgrades a global package
357
-
358
356
remove [--force] [package...]
359
357
Uninstalls a global package
360
358
359
+ install
360
+ Installs all global dependencies
361
+
361
362
list [--fetch] [--format=<simple>] [package...]
362
363
List all installed packages or just the specified ones
363
364
You can’t perform that action at this time.
0 commit comments