1. Henry Prêcheur
  2. conf

Commits

Henry Prêcheur  committed 5a55071

Fix install.sh

  • Participants
  • Parent commits 64997ef
  • Branches default

Comments (0)

Files changed (1)

File openbsd/install.sh

View file
  • Ignore whitespace
         cat ./SHA256 | egrep $* | cksum -a sha256 -c -
 }
 
+_version=52
+
 checksums bsd
 checksums '\([^x].*\.tgz'
 
-rm /obsd ; ln /bsd /obsd && cp bsd.mp /nbsd && mv /nbsd /bsd
+rm -f /obsd ; ln /bsd /obsd && cp bsd.mp /nbsd && mv /nbsd /bsd
 cp bsd /bsd.sp
 cp bsd.rd /bsd.rd
 
+function filename {
+    case $@ in
+        SHA256|bsd*|*.tgz)
+            echo $@ ;;
+        *)
+            echo $@${_version}.tgz ;;
+    esac
+}
+
 function unpack {
         for i in $*; do
                 echo ${i}
         done
 }
 
-unpack ${BASE_FILES}
+unpack $(for i in $BASE_FILES ; do filename $i ; done)
 
 case $yn in
-        [Yy]*) checksums '\(x.*\.tgz' && unpack ${X_FILES};;
+        [Yy]*)
+            checksums '\(x.*\.tgz'
+            unpack $(for i in $X_FILES ; do filename $i ; done)
+            ;;
         *) echo 'Not unpacking X11.';;
 esac