From 3ea86cef862d7034ee0d540cea5050a72505952c Mon Sep 17 00:00:00 2001
From: Egor Tensin <Egor.Tensin@gmail.com>
Date: Sat, 10 Aug 2019 23:36:25 +0300
Subject: add os.sh & fix a couple of bugs

---
 bin/update.sh | 33 +--------------------------------
 1 file changed, 1 insertion(+), 32 deletions(-)

(limited to 'bin')

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
-- 
cgit v1.2.3