aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/bin
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2019-08-10 23:36:25 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2019-08-10 23:38:58 +0300
commit3ea86cef862d7034ee0d540cea5050a72505952c (patch)
tree640fb3e6bf48c96e26a78ea315ee9c4317d3d66d /bin
parentrefactor db.sh (diff)
downloadconfig-links-3ea86cef862d7034ee0d540cea5050a72505952c.tar.gz
config-links-3ea86cef862d7034ee0d540cea5050a72505952c.zip
add os.sh & fix a couple of bugs
Diffstat (limited to '')
-rw-r--r--bin/update.sh33
1 files changed, 1 insertions, 32 deletions
diff --git a/bin/update.sh b/bin/update.sh
index c67fd26..6c9ab78 100644
--- a/bin/update.sh
+++ b/bin/update.sh
@@ -32,33 +32,11 @@ src_dir="$( cd -- "$script_dir/../src" && pwd )"
readonly src_dir
. "$src_dir/common.sh"
+. "$src_dir/os.sh"
. "$src_dir/path.sh"
. "$src_dir/vars.sh"
. "$src_dir/db.sh"
-# Cygwin-related stuff
-
-os="$( uname -o )"
-readonly os
-
-is_cygwin() {
- test "$os" == 'Cygwin'
-}
-
-check_symlinks_enabled_cygwin() {
- case "${CYGWIN-}" in
- *winsymlinks:native*) ;;
- *winsymlinks:nativestrict*) ;;
-
- *)
- dump "native Windows symlinks aren't enabled in Cygwin" >&2
- return 1
- ;;
- esac
-}
-
-# Main routines
-
script_usage() {
local msg
for msg; do
@@ -118,18 +96,9 @@ parse_script_options() {
done
}
-check_symlinks_enabled() {
- if is_cygwin; then
- check_symlinks_enabled_cygwin
- else
- return 0
- fi
-}
-
main() {
parse_script_options "$@"
check_symlinks_enabled
- ensure_database_exists
read_database
unlink_obsolete_entries
link_all_entries